I have the following data model class defined:
@PersistenceCapable
public class TestSerializableModelObj {
@Persistent(serialized="true", defaultFetchGroup="true")
private MyPOJO myField;
@Persistent(serialized="true", defaultFetchGroup="true")
private Collection<MyPOJO> myCollection;
// getter/setters
}
MyPOJO is just a simple class that implements Serializable.
When I persist this via DataNucleus/JDO and retrieve it I can read myField
just fine, but myCollection
is null (though I set it to be an Vector of two MyPOJO objects before persisting it).