Ok thanks, btw if you have an array of values, make sure to serialize
it before writing it to the database.
And unserialize it when reading it back from the database.
Django Boonman
On Dec 22 2011, 8:26 pm, Jesús García Crespo <
je...@artefactual.com>
wrote:
> Hi Django,
>
> 2011/12/22 Django Boonman <
d.boon...@ejbdesignery.nl>
>
> > **
> > we are making progress doing our own stuff in the code. I have an
> > important question for you. Peter van Garderen mentioned that it was
> > possible to add something like 'property-fields'. Instead of adding new
> > columns to a table, it was better to add 'property-fields' in a more
> > generic way without having to update the databaseschema. Does it sound
> > familiar?
>
> Yes, sure, that will make things much easier! You can do that using the
> "property" entity [1], mapped in the QubitProperty class [2]. Please notice
> that the model supports i18n and so we do in the forms.
>
> > I think you have already done things like that, could you point me to a
> > place in the code or a php file?
>
> We do extensive use of properties in our RAD metadata plugin. You can find
> it in plugins/sfRadPlugin [3]. Pay special attention to
> sfRadPlugin.class.php [4], a class wrapper which dinamically creates class
> properties via the magic methods __get() and __set() to make your new
> fields available. You can find a good example in the editAction [5].
>
> Let me know how it goes. I believe that understanding the code I linked you
> above is going to help a lot.
>
> As you can see I am also sending this email to qubit-dev for the sake of
> other developers.
>
> Happy Holidays! :-)
>
> [1]
http://code.google.com/p/qubit-toolkit/source/browse/trunk/config/sch...
> [2]
http://code.google.com/p/qubit-toolkit/source/browse/trunk/lib/model/...
> [3]
http://code.google.com/p/qubit-toolkit/source/browse/trunk/plugins/sf...
> [4]
http://code.google.com/p/qubit-toolkit/source/browse/trunk/plugins/sf...
> [5]
http://code.google.com/p/qubit-toolkit/source/browse/trunk/plugins/sf...