Hi everybody,

I am using OJB 1.0.1 (JDO API) and I have the following problem:

I have a class, let's call it, Car that has an attribute wheels of type Wheel[] (1:n relationship).
If I fetch a car object with no wheels from the db (i.e., car.wheels == null) and I try to set a new wheels array (with 4 wheels) to the fetched car, then I get a ClassCastException in Car.jdoReplaceField:


Caused by: java.lang.ClassCastException
at com.test.Car.jdoReplaceField(Car.java)
at com.sun.jdori.common.state.StateManagerImpl.prepareSetField1(Unknown Source)
at com.sun.jdori.common.state.StateManagerImpl.prepareSetField(Unknown Source)
at com.sun.jdori.common.state.StateManagerImpl.setObjectField(Unknown Source)
at com.test.Car.jdoSetwheels(Car.java)


If anybody has a clue about this error, please let me know.
Thanks for your time,

George.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to