mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 22:41:35 +00:00
Update internals migrate from deprecated methods baseTable()
This commit is contained in:
1 parent
8fb02662e6
commit
5178b76431
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -243,11 +243,11 @@ public class ModelBuildContext {
|
||||
*/
|
||||
public FkeyBuilder addForeignKey(BeanDescriptor<?> desc, TableJoin tableJoin, boolean direction) {
|
||||
|
||||
String baseTable = ctx.normaliseTable(desc.getBaseTable());
|
||||
String baseTable = ctx.normaliseTable(desc.baseTable());
|
||||
String fkName = ctx.foreignKeyConstraintName(tableName, baseTable, count.incrementAndGet());
|
||||
String fkIndex = ctx.foreignKeyIndexName(tableName, baseTable, count.get());
|
||||
|
||||
MCompoundForeignKey foreignKey = new MCompoundForeignKey(fkName, desc.getBaseTable(), fkIndex);
|
||||
MCompoundForeignKey foreignKey = new MCompoundForeignKey(fkName, desc.baseTable(), fkIndex);
|
||||
|
||||
for (TableJoinColumn column : tableJoin.columns()) {
|
||||
String localCol = direction ? column.getForeignDbColumn() : column.getLocalDbColumn();
|
||||
|
||||
+2
-2
@@ -203,10 +203,10 @@ public class ModelBuildPropertyVisitor extends BaseTablePropertyVisitor {
|
||||
if (columns.length == 1) {
|
||||
if (p.hasForeignKeyConstraint() && !importedProperty.descriptor().suppressForeignKey()) {
|
||||
// single references column (put it on the column)
|
||||
String refTable = importedProperty.descriptor().getBaseTable();
|
||||
String refTable = importedProperty.descriptor().baseTable();
|
||||
if (refTable == null) {
|
||||
// odd case where an EmbeddedId only has 1 property
|
||||
refTable = p.targetDescriptor().getBaseTable();
|
||||
refTable = p.targetDescriptor().baseTable();
|
||||
}
|
||||
col.setReferences(refTable + "." + refColumn);
|
||||
col.setForeignKeyName(foreignKeyConstraintName(col.getName()));
|
||||
|
||||
Reference in new issue
Block a user