-
1. Re: Null CMR fields broken in 3.2.0 RC2?
tommyg Mar 3, 2003 8:56 PM (in response to cschmidt)That's a good thing for people like me. Sorry! But I have a legacy database, like a lot of people, in which the foreign key can never be set to null. So it appears JBoss fills the field temporarely with a dummy value, to appease folks like myself.
Hopefully for both of us, there is a way to control the persistence logic. -
2. Re: Null CMR fields broken in 3.2.0 RC2?
cschmidt Mar 4, 2003 1:16 AM (in response to cschmidt)I can see your point. For me (creating a new schema), I don't really care as long as it works!
The EJB 2.0 spec doesn't place any restrictions on how null relationship fields are mapped to the database (section 10.3.11). Which means it's up to the container provider. A null relationship field could EITHER be represented as a SQL NULL, OR as a fixed key value that will not exist (i.e. 0, -1, etc.). To handle mapping to existing schemas, this really should be configurable.
I've been digging a little through the source code, but it takes a little doing to understand what's going on. Hoping someone with an *authoritative* opinion will weigh in here soon... ;-)
- Carl -
3. Re: Null CMR fields broken in 3.2.0 RC2?
cschmidt Mar 6, 2003 12:02 PM (in response to cschmidt)Also broken in 3.2.0 RC3. I reported this as a bug on SourceForge:
http://sourceforge.net/tracker/index.php?func=detail&aid=698235&group_id=22866&atid=376685
And supplied a nice little test case. Is noone else running into this? Just a little further detail, I've narrowed it down a bit. If you supply a null value for a CMR field at *create* time, then things will break. If you initially supply a non-null CMR value, and then in another transaction set the CMR field to null, then it works fine.
- Carl -
4. Re: Null CMR fields broken in 3.2.0 RC2?
cschmidt Mar 6, 2003 12:05 PM (in response to cschmidt)<not-on-drugs>
Wierd, I posted this but the post didn't show up, even though the topic bumped to the top of the list. Let's try again...
</not-on-drugs>
Also broken in 3.2.0 RC3. I reported this as a bug on SourceForge:
http://sourceforge.net/tracker/index.php?func=detail&aid=698235&group_id=22866&atid=376685
And supplied a nice little test case. Is noone else running into this? Just a little further detail, I've narrowed it down a bit. If you supply a null value for a CMR field at *create* time, then things will break. If you initially supply a non-null CMR value, and then in another transaction set the CMR field to null, then it works fine.
- Carl -
5. Re: Null CMR fields broken in 3.2.0 RC2?
gturner Sep 16, 2003 3:50 PM (in response to cschmidt)Is this fixed?
I just upgraded an old app from 3.0.8 to 3.2.2RC3 and am having the same problem.
Funny thing is that the artifical zero isn't actually updated on the foreign key column. I'm using Oracle9i.