mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-7960 Could not create instance of BaseIntegerId or BaseLongId entity in additional datastore if the autoincrement property is not set for ID
This commit is contained in:
parent
6ec0bd3b77
commit
050116f1ba
@ -143,10 +143,6 @@ public class MetadataImpl implements Metadata {
|
||||
Entity key = create(primaryKeyProperty.getRange().asClass());
|
||||
((BaseGenericIdEntity) entity).setId(key);
|
||||
} else {
|
||||
// assign autogenerated ID only if the entity is stored to the main database
|
||||
if (!Stores.MAIN.equals(tools.getStoreName(metaClass)))
|
||||
return;
|
||||
|
||||
if (entity instanceof BaseLongIdEntity) {
|
||||
((BaseGenericIdEntity<Long>) entity).setId(numberIdSource.createLongId(getEntityNameForIdGeneration(metaClass)));
|
||||
} else if (entity instanceof BaseIntegerIdEntity) {
|
||||
|
Loading…
Reference in New Issue
Block a user