Re: ec.saveChages gives null exception (didn't before)
Re: ec.saveChages gives null exception (didn't before)
- Subject: Re: ec.saveChages gives null exception (didn't before)
- From: Drew Thoeni <email@hidden>
- Date: Tue, 8 Mar 2005 06:48:39 -0500
< Florijan posted me off-list, but this seems to be a possible
explanation - with a compounding problem>
Florijan,
I do have the primary key exposed, but believe I needed to because I'm
doing "manual" joins to an unflattened table that is a many-to-many.
Here's the snippet of code that does that. Without access to the key,
classNumber(), I don't know how to make that join happen. Any thoughts?
Am I looking at this all wrong?
BookStudent newBSJoin =
(BookStudent)EOUtilities.createAndInsertInstance(ec,"BookStudent");
newBSJoin.setClassNumber(this.classNumber());
I think this may be the problem, as it is the only non-null column.
However, this happens also on updates. Which it seems it wouldn't as
the key would already existis.
Regards,
Drew
On Mar 7, 2005, at 9:04 AM, Florijan Stamenkovic wrote:
Hi...
Did you by any chance set the primary key to be a class property?
Because if you didn't, as you shouldn't in most cases, he would not
check it, and as all others are allowed to be null, there couldn't be
a validation error... But that doesn't explain that the error is
suddenly there... Nothing really explains that one so easily.. Can you
backtrace what you were doing/changing?
Just a thought...
Florijan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden