Stein M. Hugubakken wrote:
Nick Stuart wrote:
Ok, found another way around the issue. If I leave the field in the database as accepting nulls, and change the order around of my update() and create() so it reads like:
db.begin(); db.create(user); db.update(user.getDepartment()); db.commit();
It just throws the DuplicateEntryException, and not the null pointer exception as it was before. So, as long as I don’t enforce non-nulls in the database it appears to take care of the problem. Of course this should only be a temporary solution, and am willing to try and help figure out where the problem is.
Does everything works when the user don't exist?
Can you provide me with a small test-case(just some minimal code+sql to recreate the scenario) so I can use it for debugging?
Nick,
I agree with Stein. Please make a tarball of the necessary items for this example to run (Java classes, DDL, database and mapping descriptors, etc.) and send it to Stein and I offline. Preferably with an Ant build descriptor to compile and run it all. But if you don't have this it'll only take me a few minutes to put one together. This is not a difficult issue and should be easy to solve. Seeing the full example that you're using makes troubleshooting go much easier. It's also easier to fix the code, tar it up and send it back to you so you can see the changes for yourself.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
The Castor Project http://www.castor.org/
Apache Geronimo http://incubator.apache.org/projects/geronimo.html
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
