Cayenne 4.1.M1 problem

2017-11-10 Thread John Huss
I've found another issue with 4.1.M1 through my unit tests. If you have: 1) modeled a primary key as an ObjAttribute, like customerPK 2) modeled it as an object type, like java.lang.Long 3) are using the Cayenne-Generated (Default) PK generation strategy Then Cayenne won't generate any PKs for t

Race Condition in o.a.c.u.ReferenceMap.values() Causing NPE in ObjectStore.objectsInState(int)

2017-11-10 Thread David Feshbach
This is in 4.1.M1 The stack trace is pretty short: java.lang.NullPointerException at org.apache.cayenne.access.ObjectStore.objectsInState(ObjectStore.java:520) at org.apache.cayenne.access.DataContext.newObjects(DataContext.java:242) ... The problem is in ReferenceMap.values(). If the GC runs bet