Hi Andy,

On Nov 2, 2007, at 12:19 PM, 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 ?

I think it makes sense. Just like other immutable object types like Integer.

I'm open to having them default non-persistent but seems better to have them default persistent.

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.

For starters, just store/retrieve enum values. Take a look at the tests that Michelle checked in and see if they're ok.

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.

We haven't discussed adding JDOQL tests. Maybe you could suggest some, or contribute some.

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 ;-)

Cool. If you could comment further on the specific API we might get consensus pretty fast. A couple of things we need to discuss: the return type of Object[ ] vs. Collection; argument type for ObjectState and Class of Collection<ObjectState> vs ObjectState[ ]; order of parameters if we use ObjectState[ ] because only one can be varargs.

Craig

--
Andy  (Java Persistent Objects - http://www.jpox.org)

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to