mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
FIX: Do not add AssocOne-generatedProperties if they should not. (#1106)
This commit is contained in:
committed by
Rob Bygrave
parent
f805bec8f2
commit
7336ce81bd
@@ -41,10 +41,15 @@ public class FactoryAssocOnes {
|
||||
// typically generated 'who' created/modified properties
|
||||
switch (mode) {
|
||||
case INSERT:
|
||||
list.add(new BindableAssocOneGeneratedInsert(one));
|
||||
if (one.getGeneratedProperty().includeInInsert()) {
|
||||
list.add(new BindableAssocOneGeneratedInsert(one));
|
||||
}
|
||||
break;
|
||||
case UPDATE:
|
||||
list.add(new BindableAssocOneGeneratedUpdate(one));
|
||||
if (one.getGeneratedProperty().includeInUpdate()) {
|
||||
// A 'Who Created property' is never updated
|
||||
list.add(new BindableAssocOneGeneratedUpdate(one));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user