Andy Jefferson wrote:
1. Enum tests: Michelle is just about ready to check in. Running last
tests. In JPOX, enums are not persistent by default and seem to have
trouble with numeric types. AI Michelle check in tests; AI Craig
update spec to mandate enums as singleton, immutable objects and
allow other enum support;
So are enum fields going to be default "persistent" now ?
Await to see what tests we are talking about here ... persistence?,
retrieval?, JDOQL?, something else, because we obviously have some of our own
and test the majority of things. The only known issue is for JDOQL
expressions comparing an enum field with the enum value (when it was
persisted as a numeric). Comparing with the enum ordinal works fine in that
situation.
Tests were just checked in. Try, for example, models1.conf, where we get:
test(org.apache.jdo.tck.models.fieldtypes.TestFieldsOfSimpleEnum)javax.jdo.JDODataStoreException:
Cannot set String parameter: value = AL for column
"applicationidentity1.FIELDSOFENUMORDINAL.ENUM94" : Invalid character
string format for type INTEGER.
I know this is supposed to work, so maybe you can tell us what's going
wrong.
Other issues: enums not persistent by default in jpox, as you know, and
arrays of enums not supported.
-- Michelle
Email discussion: Proposed method to ask the persistence manager for
managed instances might have a signature Object[ ] getManagedInstances
(ObjectState[ ], Class... classes) which filters instances based on
their state and class. This could be part of 2.1 or deferred to 2.2.
Is this something that JPOX wants to see sooner?
JPOX already has
Collection PM.getManagedObjects()
and could have any of the mentioned combinations pretty fast ;-)