B�rries Ludwig wrote:
>
> public class Keyword {
> /*** this ***/
> private String keyword = null;
> public String uid = null;
> /*** relations ***/
> public ArrayList urls = new ArrayList();
> public ArrayList predecessors = new ArrayList();
> public ArrayList successors = new ArrayList();
> }
>
> The insert work fine for the following:
>
> Keyword keyword1 = new Keyword();
> keyword1.setKeyword("Programmierung");
>
> Keyword keyword2 = new Keyword();
> keyword2.setKeyword("Java");
> keyword1.addSuccessor(keyword2);
> keyword2.addPredecessor(keyword1);
>
> Keyword keyword3 = new Keyword();
> keyword3.setKeyword("Datenbanken");
> keyword2.addSuccessor(keyword3);
> keyword3.addPredecessor(keyword2);
>
> db.create((Object)keyword1);
> db.create((Object)keyword2);
> db.create((Object)keyword3);
Boerries,
What you're attempting to do are self relations and these are not
supported in Castor. You're relating an object of type keyword to an
object of type keyword. In certain models, Castor can handle very simple
forms of this type of relation. However, it is not a supported feature.
As you've discovered this type of relation breaks down very quickly.
--
+------------------------------+
| Bruce Snyder |
| [EMAIL PROTECTED] |
+------------------------------+
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev