Re: [castor-dev] Re: TypeSafe Enums and Collections

2005-01-18 Thread Ram_Sarma
Keith, Thanks for the response. I tried returning null from my newInstance methods. This time I get an error "Unable to create a new instance of type : Subjects"... Subjects is an enum type and has no constructor. Do we need to specify anything else in my mapping? Is there any place where I coul

[castor-dev] Re: Bug or am I doing something wrong...

2005-01-18 Thread Nick Stuart
A quick addition, just wanted to show a quick screen shot. you can check out here: http://cs.usm.maine.edu/~nstuart/snapshot1.png Take a look at _ids. Its size is 1, but the first element is null :( that cant be good. On Tue, 18 Jan 2005 15:42:58 -0500, Nick Stuart <[EMAIL PROTECTED]> wrote: >

[castor-dev] Bug or am I doing something wrong...

2005-01-18 Thread Nick Stuart
Ok, trying to use simple lazy collection here and have something borked up. The exception I'm getting is: org.exolab.castor.jdo.PersistenceException: Identities can't be null! at org.exolab.castor.persist.RelationCollection$IteratorImp.lazyLoad(RelationCollection.java:290) at org

Re: [castor-dev] Re: TypeSafe Enums and Collections

2005-01-18 Thread Keith Visco
You're on the right track, but you should probably return null from the newInstance methods instead of throwing exceptions. Castor will invoke those methods and will expect either an actual instance or null as the return value. Also if you extend GeneralizedFieldHandler instead of AbstractFie

[castor-dev] Re: TypeSafe Enums and Collections

2005-01-18 Thread Ram_Sarma
hey, Just wondering if anyone had any thought on this. I had to write up a custom handler (code borrowed from an earlier post and make changes for handling a list). The marshalling works but the unmarshalling tries to create an instance and fails for the type safe enums. This is kindof urgent and