Hi all,
I have strange problem use the castor to deal with
self reference table.
After I save the children to parent. and then
colse the database, and then open a new jdomanager
Database, search the parent, the number of the
children isn't right. it miss the one I just append.
But I close the program, and start again, search the
same parent, It will show the right number of the
children.
Exemple:
TABLE
[Group]
ID, GROUP_NAME, PARENT_ID
1, abc , NULL
2, abcd , 1
After I insert a new sub-group(abcde) to 'abc', It
still show the 'abc', 'abcd' without 'abcde'.
But when I start a new program, search the 'abc', it
will show 'abc', 'abcd', 'abcde'.
Group{
integer id;
Group parent;
Set subGroup;
}
<class name="myapp.Group" identity="id">
<map-to table="GROUP"/>
<field name="id" type="integer" >
<sql name="ID" type="int"/>
</field>
<field name="GroupName"
type="java.lang.String">
<sql name="GROUP_NAME" type="varchar"/>
</field>
<field name="Parent"
type="myapp.Group" require="false"
>
<sql name="PARENT_ID"/>
</field>
<field name="SubGroup"
type="myapp.Group"
collection="collection"
>
<sql many-key="PARENT_ID"/>
</field>
</class>
__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------