mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1743 - When using @PrimaryKeyJoinColumn, FK constraint generation cannot be disabled
This commit is contained in:
@@ -33,11 +33,17 @@ public final class TableJoin {
|
||||
*/
|
||||
private final int queryHash;
|
||||
|
||||
private final PropertyForeignKey foreignKey;
|
||||
|
||||
public TableJoin(DeployTableJoin deploy) {
|
||||
this(deploy, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TableJoin.
|
||||
*/
|
||||
public TableJoin(DeployTableJoin deploy) {
|
||||
|
||||
public TableJoin(DeployTableJoin deploy, PropertyForeignKey foreignKey) {
|
||||
this.foreignKey = foreignKey;
|
||||
this.table = InternString.intern(deploy.getTable());
|
||||
this.type = deploy.getType();
|
||||
this.inheritInfo = deploy.getInheritInfo();
|
||||
@@ -52,6 +58,7 @@ public final class TableJoin {
|
||||
}
|
||||
|
||||
private TableJoin(TableJoin source, String overrideColumn) {
|
||||
this.foreignKey = null;
|
||||
this.table = source.table;
|
||||
this.type = source.type;
|
||||
this.inheritInfo = source.inheritInfo;
|
||||
@@ -96,14 +103,6 @@ public final class TableJoin {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a hash value for adding to a query plan.
|
||||
*/
|
||||
public int queryHash() {
|
||||
return queryHash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder(30);
|
||||
@@ -114,6 +113,13 @@ public final class TableJoin {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the foreign key options.
|
||||
*/
|
||||
public PropertyForeignKey getForeignKey() {
|
||||
return foreignKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the join columns.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user