mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-20 23:05:23 +00:00
#225 - Mapping - Add / review support for @IdClass
This commit is contained in:
1 parent
602a35d0b6
commit
4799c56e25
34 files changed
+765
-309
No files matched your search
@@ -51,6 +51,7 @@ public class DeployBeanProperty {
|
||||
private static final int AUDITCOLUMN_ORDER = -1000000;
|
||||
private static final int VERSIONCOLUMN_ORDER = -1000000;
|
||||
private static final Set<Class<?>> PRIMITIVE_NUMBER_TYPES = new HashSet<>();
|
||||
|
||||
static {
|
||||
PRIMITIVE_NUMBER_TYPES.add(float.class);
|
||||
PRIMITIVE_NUMBER_TYPES.add(double.class);
|
||||
@@ -64,6 +65,8 @@ public class DeployBeanProperty {
|
||||
*/
|
||||
private boolean id;
|
||||
|
||||
boolean importedPrimaryKey;
|
||||
|
||||
/**
|
||||
* Flag to mark the property as embedded. This could be on
|
||||
* BeanPropertyAssocOne rather than here. Put it here for checking Id type
|
||||
@@ -611,6 +614,16 @@ public class DeployBeanProperty {
|
||||
this.dbUpdateable = false;
|
||||
}
|
||||
|
||||
public void setImportedPrimaryKey() {
|
||||
this.importedPrimaryKey = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set to true if this is part of the primary key.
|
||||
*/
|
||||
public void setImportedPrimaryKeyColumn(DeployBeanProperty primaryKey) {
|
||||
this.importedPrimaryKey = true;
|
||||
}
|
||||
|
||||
public boolean isAggregation() {
|
||||
return aggregation != null;
|
||||
@@ -889,6 +902,13 @@ public class DeployBeanProperty {
|
||||
return genericType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this is part of the primary key.
|
||||
*/
|
||||
public boolean isImportedPrimaryKey() {
|
||||
return importedPrimaryKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this is included in the unique id.
|
||||
*/
|
||||
@@ -1046,6 +1066,10 @@ public class DeployBeanProperty {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public boolean isIdClass() {
|
||||
return desc.isIdClass();
|
||||
}
|
||||
|
||||
public void addDbMigrationInfo(DbMigrationInfo info) {
|
||||
if (dbMigrationInfos == null) {
|
||||
dbMigrationInfos = new ArrayList<>();
|
||||
|
||||
Reference in new issue
Block a user