Use collection instead. Internally, castor would use thier lazy loading
collection implementation ( RelationCollection ) during loading but u can
use vector or arraylist for new record creation ( i.e. when the collection
is still null ).

Regards,
Low Heng Sin ( [EMAIL PROTECTED] )

-----Original Message-----
From: Peter Brown [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 6:45
To: [EMAIL PROTECTED]
Subject: [castor-dev] lazy loading


I get the below error when I add lazy="true" to many field in castor... Any
help would be appreciated, thanks.

On a related note, is there support for Vector's when using Lazy Loading?
And if not, what does work?

org.exolab.castor.jdo.DataObjectAccessException: Type conversion error:
could not set value of FieldMolder(Tidbits,flywheel.visitor.Tidbit)null
inside flywheel.visitor.Visitor with value of type org.exolab.castor
.persist.RelationCollection
        at
org.exolab.castor.persist.FieldMolder.setValue(FieldMolder.java:319)
        at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:755)
        at org.exolab.castor.persist.LockEngine.load(LockEngine.java:361)
        at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:54
5)
        at
org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:573)
        at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImp
l.java:556)
        at flywheel.util.CastorQuery.execute(CastorQuery.java:54)
        at flywheel.visitor.VisitorManager.getByID(VisitorManager.java:30)
        at Test.doPost(Test.java:32)
        at Test.doGet(Test.java:44)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
        at com.evermind._cxb._abe(Unknown Source)
        at com.evermind._cxb._uec(Unknown Source)
        at com.evermind._io._twc(Unknown Source)
        at com.evermind._io._gc(Unknown Source)
        at com.evermind._if.run(Unknown Source)

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to