This one time, at band camp, Werner Guttmann said:
WG>Marcelo,
WG>
WG>I am trying to reproduce you rproblem. So far, I've successfully created the
WG>SQL table, created a JUnit test case that runs the below code snippet and
WG>adapted the mapping file to reflect your scenario.
WG>
WG>Problem is, I cannot reproduce your problem (so far). But to be honest, in teh
WG>following code fragment
WG>
WG>> > java.util.ArrayList key = new java.util.ArrayList(4);
WG>> > key.add( espacioFisicoAbstracto.getCodigoZona() );
WG>> > key.add( espacioFisicoAbstracto.getCodigoArea() );
WG>> > key.add( espacioFisicoAbstracto.getFila() );
WG>> > key.add( espacioFisicoAbstracto.getColumna() );
WG>> >
WG>> > Complex llaveEspacioFisico = new Complex( key.toArray() );
WG>> >
WG>> > EspacioFisicoAbstracto espacioFisico = (EspacioFisicoAbstracto)
WG>> > db.load( //** Here is trouble**//
WG>> > EspacioFisicoAbstracto.class, llaveEspacioFisico, db.DbLocked);
WG>> >
WG>> >
WG>> > espacioFisico.setCodigoAparcadero(espacioFisicoAbstracto.getCodigoAparc
WG>> >ader o());
WG>> > espacioFisico.setCodigoVehiculo(espacioFisicoAbstracto.getCodigoVehicul
WG>> >o()) ; espacioFisico.setFechaCreacion(Calendar.getInstance().getTime());
WG>
WG>I've made some assumptions, as I don't know how you loaded or created
WG>espacioFisicoAbstracto.
WG>
WG>Can you please provide me with an extended code fragment that shows how you
WG>are obtaining that espacioFisicoAbstracto instance ?
Marcelo, Werner,
My apologies for not seeing this sooner, but I noticed that there is a
date type in the mapping. Castor can throw an ObjectModifiedException
when a field fails Castor's dirty check (which uses .equals()). This
can occur when using fields of type float, double, date, etc. Begin by
isolating the date fields by instructing Castor not to perform its dirty
check on them like so:
<sql name="foo" type="date" dirty="ignore" />
See if the ObjectModifiedException goes away after taking this step.
This might then lead you down the road of locating the actual problem.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev