Hi,
 i am pretty new to castor JDO, and i would like to
know if it is possible to persist recursive objects to database using
castor JDO.

Let me explain,
i have 3 objects XBEL, FOLDER and BOOKMARK.
Here is a description of the first two:

public class Xbel implements java.io.Serializable {

    private Info _info;
    private java.util.ArrayList _folderList;
...
}

public class Folder implements java.io.Serializable {

    private java.lang.String _title;
    private java.util.ArrayList _bookmarkList;
    private java.util.ArrayList _folderList;
...
}

As you can see, Folder object has a list of Folder in its attributes =>
i have a tree structure with Xbel being the root node, bookmark being a leaf
and folder
being a node.

I guess i could design a database with a Node table
like Node ( id,father_id,type) to store relations between folders and
bookmarks +
folder and bookmark tables just storing information (title, info, etc...)
without any relation information.
But i won't be able to persist my objects with such a database schema with
Castor.

How can i store such objects in database? I also guess i could marshall
objects to an xml string
and store that xml string to database as xml is fine to represent a tree
structure . But i don't want
that kind of solution, just prefer to use castor JDO.

Any example would be appreciated.

Thanks,
Luc

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to