#642 - ENH: Add support for OneToMany expression isEmpty() / isNotEmpty() ... which is effectively an EXISTS and NOT EXISTS subquery

This commit is contained in:
Robin Bygrave committed 2016-04-08 13:41:43 +12:00
1 parent c58db0033d
commit 4059034891
20 files changed
+675 -294

No files matched your search

@@ -5,6 +5,7 @@ import com.avaje.ebean.bean.EntityBean;
import com.avaje.ebean.config.EncryptKey;
import com.avaje.ebean.config.dbplatform.DbEncryptFunction;
import com.avaje.ebean.config.dbplatform.DbType;
import com.avaje.ebeaninternal.api.SpiExpressionRequest;
import com.avaje.ebeanservice.docstore.api.mapping.DocMappingBuilder;
import com.avaje.ebeanservice.docstore.api.mapping.DocPropertyMapping;
import com.avaje.ebean.plugin.Property;
@@ -834,6 +835,12 @@ public class BeanProperty implements ElPropertyValue, Property {
return false;
}
@Override
public String getAssocIsEmpty(SpiExpressionRequest request, String path) {
// overridden in BanePropertyAssocMany
throw new RuntimeException("Not Supported or Expected");
}
public Object[] getAssocIdValues(EntityBean bean) {
// Returns null as not an AssocOne.
return null;