Hi.
Pascal Voitot wrote:
I see in the code that "classical" ORM
mapping and "dynamic" EntityMap
XML mapping are both used... sometimes for backward compatibility,
sometimes as a feature... but this is not easy to understand the exact
status...
Tell me if I'm wrong or right:
- Class/PropertyClass classical Table mapping is no more the preferred
choice
no.
- a Class is now directly linked to a Doc and it is
created and stored
within the Doc...
yes
- Class/PropertyClass mapping is now stored by default
using XML
custommapping in Doc (Class tables are still available with the right
option)
Class _serialization_ is stored in doc.xWikiClassXML
class.custommapping is edited by user. It is just hibernate mapping of
objects of this class.
- Object/Property are stored by default in tables
using classical ORM
but also using EntityMap when the Class has a custommapping
yes
So, what is the current and future tendency for all of
this? classes in
XML and object in tables? something different?
I don't know the history of the project but I find the code of XWikiDoc
is quite dependent on the chosen mapping of classes, objects etc...
Do you intend to introduce an abstraction about the mapping?
custommapping is a feature only. It is needed if you want to store
objects in another table with some specific schema. This is useful if
you want to access these objects in another app. It is also slightly
improve performance.
Finally, a bulk remark: going further, could a
XWikiDoc be considered as
a class itself?
I think no.
Doc can contain class. And this class is named the same as doc. But they
are different entities.
--
Artem Melentyev