Hi,
Using xwiki class editor we can create classes and package them as
application. Classes can also have an entity relationship among themselves.
I have few question on how can we relate classes in xwiki. Let me start by
posting a simple example:
Say our application has two classes Product and Review. Relationship between
them is a product can have multiple reviews.
Now I can relate these classes in following way:
1. Create a product document and add the product object to it. All the
reviews for that product are also added to that product document as review
objects. Thus I have grouped reviews to a product.
2. Create a product document and add the product object to it. For each
review for that product created a review document and add review object to
that review document and make review document child of product document.
Thus I have arranged reviews as children of a product.
3. In the review class add a db list field, which refers to objects of
product class. While creating a review object choose the right product name
from the list. Thus reviews are associated to a product.
Thus you can see that in each of the three ways I have related two classes.
Only difference is different ways of storing them. (again presentation still
can be same and I am here interested in optimal storage strategy only).
So I would like to know which of the above three is the best way of relating
classes. Are there any more ways of achieving the relationship I talked
initially?
I would like to know from people who have been developing complex
applications involving relationship between several xwiki classes as what
would be the best way of arranging the use case just described.
Thanks
Sachin
-----
http://www.assembla.com/wiki/show/sachin_mittal about me:
--
View this message in context:
http://www.nabble.com/Relating-classes-in-xwiki-tp16851540p16851540.html
Sent from the XWiki- Dev mailing list archive at
Nabble.com.