I have a situation where I have a 1-n relation between a group and its
members. The members are created independently and get assigned to a
group later (hence the null group id in member). I have the matching
reference descriptor to the Group class in Member and a collection
descriptor for the Members in the group.
Table Member
(
id int primary key
name varchar(32) not null
group_id int,
foreign key group_id references group(id)
)
Table Group
(
id int primary key
name varchar(32)
...
)
Here's the problem:
When I add a member to the table with no group object reference, it sets
the group_id field to 0 (which is not correct - I want it to be null).
In order to get around this, I set the access="anonymous" attribute on
the reference descriptor as well as the primary keys and was able to get
the null into the group id like I wanted but after the insert of the
member instance no longer has the new primary key (which is set to
autoincrement using HiLow Seq. manager) field set which is a problem.
It seems that I have a problem whichever method I choose. Is this true,
or am I doing something wrong? Seems like a pretty basic thing to me so
I'm sure the problem is on my side.
I'm using rc4 and HSQL
Thanks
Raghavan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]