I'm proposing to implement a new property type: A foreign key, analogous to the concept in relational databases. Together with custom mapping, a property like this would make it possible to use Xwiki as a frontend for a relational database, while making full use of the wikis capabilities(configurability, history, etc). The implementation would look similar to the existing "Database list" on the outside, but it would make a lot more use of the databases features. If A links to B, and someone deletes B the reference in A would either be set to null, or the delete would be stopped, depending on the configuration. It would also make it possible to adress associated objects directly in hql.
The basic functionality can be emulated using DBList(adding a property to one object by choosing from existing instances of another class), but this is not useful if one wants to have "real" foreign key behaviour in the wiki and the underlying DB. If there is a demand for this I will be happy to contribute a patch once I am done, and I will try make the code nice enough to submit. Otherwise I will probably just make it as a hack to meet the exact need that I have... Thomas _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

