2008/3/14, Peter Reitsma <[EMAIL PROTECTED]>: > In an EditWizard on object A I want to enable adding relations using > <command name="search" etc> option. But I want to prevent duplicate B's from > being added. In relational terms the foreign key should be unique. > > Would it be possible to add a constraint attribute to the <command > name="search"> node, that already filters out those nodes of type B that > already are related to A ?. > In this case, the user simply cannot select for addition those nodes that > have been added already. > > Since these numbers of the already related B's are extrable from the in > memory XML representation of the document, theoratically this could be done > by creating a nifty XPath that returns the existing B's in an SQL where > clause format, NOT IN(1,4,2,etc...). > > Anybody with me on this ?
I agree that this would be nice to have. I don't readily know whether it would be possible already and have no such nifty xpath handy. Sorry. If you craft one, please let us know :-) Michiel -- mihxil' http://meeuw.org nl_NL eo_XX en_US _______________________________________________ Developers mailing list Developers@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/developers