Hi Pascal,
Thannks for the detailed explanation!
Pascal Voitot wrote:
Hello,
by default, Classes aren't stored in any specific table but are stored as
XML with the document...
You can trigger an option called UseClassesTable or something like that
which will make classes be stored in tables using the hibernate mapping
defined by XWIki (tables xwikiclasses and xwikiclassesprop)...
You can even provide your custom mapping...
Anyway, this is not important because the class is the data structure and
what you certainly need is to keep objects and property values. The objects
are stored in the XWIkiObjects table and properties in the XWikiProperties
table using objectID as external key and also in the specific XWikiTypeTable
(XWikiStrings, XWikilongs etc...) depending on the type of the property.
Please, what is the so called UseClassesTable option intended for?
Concerning the deletion of properties, it doesn't
exist yet because it is
not so simple... But I'm currently working on a solution for that... I
should propose a demo of it very soon...
These are great news! It is frequent to make a mistake as Kammy stated.
And event more frequent is that a group changes its mind about the
design of a given class.
For the time being, this is not really easy because
you have to go in the
XWikiDoc table and modify the XWD_CLASS_XML to remove the unwanted field...
Then you have also to find all the objects you created for this class and
remove the unwanted fields...
regards
Pascal
There is still a Kamy's question left: "How can we access the values of
any instance of the created class?" It may seem simple, but I and others
are having a hard time trying to access and show these values. For
instance, see this...
http://tinyurl.com/3f44gm
Please, could you elaborate your answer in that sense? Could it be
advisable to add an example about how to access properties values in a
given object to the FAQ tutorial? Perhaps how to retrieve all questions
with a given string in question property.
There is a FAQs entry about this (
http://tinyurl.com/6rgm8h). I am sure
this is enough for programmers, but it is a bit "conceptually dense" for
non-programmers like me! As usually an example would help.
Thanks for your help,
Ricardo
On 4/15/08, Kamna Jain <kammy.scorpi(a)gmail.com>
wrote:
Hello all,
I went through the TodoClass tutorial and found it useful.
I have a question regarding this functionality.
Are these classes or the values of the properties for its instances saved
in
any table in the Xwiki database?
Say, we use Classes and Objects to create a form that the user needs to
create a document. Will the form values be saved in a database?
How can we access the values of any instance of the created class?
Also, how do we Delete a property from a Class definition? (If added by
mistake while creating the class)
Thanks for all help
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Ricardo RodrÃguez
Your EPEC Network ICT Team