HHH-4362 - @RowId
This commit is contained in:
parent
df9d8939bb
commit
ada64c172a
|
@ -53,4 +53,5 @@ public @interface Entity {
|
||||||
String persister() default "";
|
String persister() default "";
|
||||||
/** optimistic locking strategy */
|
/** optimistic locking strategy */
|
||||||
OptimisticLockType optimisticLock() default OptimisticLockType.VERSION;
|
OptimisticLockType optimisticLock() default OptimisticLockType.VERSION;
|
||||||
|
String rowId() default "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,7 @@ public class EntityBinder {
|
||||||
private AccessType propertyAccessType = AccessType.DEFAULT;
|
private AccessType propertyAccessType = AccessType.DEFAULT;
|
||||||
private boolean wrapIdsInEmbeddedComponents;
|
private boolean wrapIdsInEmbeddedComponents;
|
||||||
private String subselect;
|
private String subselect;
|
||||||
|
private String rowId;
|
||||||
|
|
||||||
|
|
||||||
public boolean wrapIdsInEmbeddedComponents() {
|
public boolean wrapIdsInEmbeddedComponents() {
|
||||||
|
@ -155,6 +156,7 @@ public class EntityBinder {
|
||||||
optimisticLockType = hibAnn.optimisticLock();
|
optimisticLockType = hibAnn.optimisticLock();
|
||||||
selectBeforeUpdate = hibAnn.selectBeforeUpdate();
|
selectBeforeUpdate = hibAnn.selectBeforeUpdate();
|
||||||
polymorphismType = hibAnn.polymorphism();
|
polymorphismType = hibAnn.polymorphism();
|
||||||
|
rowId = hibAnn.rowId();
|
||||||
explicitHibernateEntityAnnotation = true;
|
explicitHibernateEntityAnnotation = true;
|
||||||
//persister handled in bind
|
//persister handled in bind
|
||||||
}
|
}
|
||||||
|
@ -165,6 +167,7 @@ public class EntityBinder {
|
||||||
optimisticLockType = OptimisticLockType.VERSION;
|
optimisticLockType = OptimisticLockType.VERSION;
|
||||||
polymorphismType = PolymorphismType.IMPLICIT;
|
polymorphismType = PolymorphismType.IMPLICIT;
|
||||||
selectBeforeUpdate = false;
|
selectBeforeUpdate = false;
|
||||||
|
rowId = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,6 +507,7 @@ public class EntityBinder {
|
||||||
mappings,
|
mappings,
|
||||||
this.subselect
|
this.subselect
|
||||||
);
|
);
|
||||||
|
table.setRowId( rowId );
|
||||||
|
|
||||||
if ( persistentClass instanceof TableOwner ) {
|
if ( persistentClass instanceof TableOwner ) {
|
||||||
LOG.bindEntityOnTable(persistentClass.getEntityName(), table.getName());
|
LOG.bindEntityOnTable(persistentClass.getEntityName(), table.getName());
|
||||||
|
|
Loading…
Reference in New Issue