mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
* #52 - @ManyToOne support inside @Embeddables Initial test and work * #52 - @ManyToOne support inside @Embeddables Initial test and work * #52 - @ManyToOne support inside @Embeddables Initial test and work * #52 - @ManyToOne support inside @Embeddables Initial test and work * #52 - @ManyToOne support inside @Embeddables Initial test and work * #52 - @ManyToOne support inside @Embeddables Initial test and work * #52 - @ManyToOne support inside @Embeddables Update test with sql capture * #52 - @ManyToOne support inside @Embeddables Update test with cache clearing before hand (such that we hit DB on lazy load)
This commit is contained in:
@@ -17,9 +17,16 @@ abstract class AssocOneHelp {
|
||||
|
||||
protected final BeanDescriptor<?> target;
|
||||
|
||||
private final String path;
|
||||
|
||||
AssocOneHelp(BeanPropertyAssocOne<?> property) {
|
||||
this(property, null);
|
||||
}
|
||||
|
||||
AssocOneHelp(BeanPropertyAssocOne<?> property, String embeddedPrefix) {
|
||||
this.property = property;
|
||||
this.target = property.targetDescriptor;
|
||||
this.path = (embeddedPrefix == null) ? property.name : embeddedPrefix + "." + property.name;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,7 +74,7 @@ abstract class AssocOneHelp {
|
||||
boolean disableLazyLoading = ctx.isDisableLazyLoading();
|
||||
Object ref = target.contextRef(pc, ctx.isReadOnly(), disableLazyLoading, id);
|
||||
if (!disableLazyLoading) {
|
||||
ctx.register(property.name, ((EntityBean) ref)._ebean_getIntercept());
|
||||
ctx.register(path, ((EntityBean) ref)._ebean_getIntercept());
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user