Ken, this problem sounds to be a bit more difficult then your last one.
Could you please create a new issue in jira (our bug tracking system) under:

http://jira.codehaus.org/browse/CASTOR

and attach a test case following the description at:

http://castor.codehaus.org/how-to-submit-a-bug.html

This will allow me to replay your problem and debug in Castor source to
see what happens. Having said that I'm not sure yet if this is a bug but
it looks like the internal cache does not get updated.

Ralf
Castor JDO, committer


[EMAIL PROTECTED] schrieb:
> 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]
> -------------------------------------------------

-- 

Syscon Ingenieurbüro für
Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
D-72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Email: [EMAIL PROTECTED]
Web:   www.syscon-world.de

-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to