Can handle one to many & many to one relations in docstore only entities (#1158)

This commit is contained in:
Roland Praml authored and Rob Bygrave committed 2017-10-06 09:42:05 +13:00
1 parent 1651d5e119
commit bbe8abcc2e
6 files changed
+204 -1

No files matched your search

@@ -1038,6 +1038,13 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
}
if (prop.getMappedBy() == null) {
// if we are doc store only we are done
// this allowes the use of @OneToMany in @DocStore - Entities
if (info.getDescriptor().isDocStoreOnly()) {
prop.setUnidirectional();
return;
}
if (!findMappedBy(prop)) {
makeUnidirectional(info, prop);
return;
@@ -96,7 +96,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
if (!isTransient) {
//noinspection StatementWithEmptyBody
if (embedded) {
if (embedded || descriptor.isDocStoreOnly()) {
// no imported or exported information
} else if (!oneToOneExported) {
importedId = createImportedId(this, targetDescriptor, tableJoin);