Hello,
we get when executing a query with MEMBER OF on a large list the following InternalException:
Caused by: com.objectdb.o.InternalException: merge2 com.btc.ep.coverage.bl.internal.dmos.CoverageRecordImpl:null => merger[2850057]-missing:223 at com.objectdb.o.PBI.B(PBI.java:124) at com.objectdb.o.PBI.q(PBI.jave:97) at com.objectdb.o.OBI.Vp(OBI.java:244) (... more see attached Image)
Our query looks like this:
String recordClassName = CoverageRecordImpl.class.getName(); String propertyClassName = propertyClass.getName(); String query = "SELECT DISTINCT property.uid FROM " + propertyClassName + " AS property, " + recordClassName + " AS record " + "WHERE property.uid MEMBER OF record.properties AND property.scopeID MEMBER OF ?1"; TypedQuery<String> q = em.createQuery(query, String.class); q.setParameter(1, scopeIDs); //scopeIDs is a Set<String> List<String> resultArray = q.getResultList();
Basically, the query works as expected.
The above exception occurs only when the Set record.properties contains more than 20.000 elements.
The field 'properties' (query: record.properties) of CoverageRecordImpl is a list of String:
@Basic private List<String> properties = new ArrayList<>();