Re: DB_DataObject: M:N relations

From: Date: Mon, 13 Oct 2003 19:55:18 +0000
Subject: Re: DB_DataObject: M:N relations
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22661@lists.php.net to get a copy of this message
Mocsnik Norbert wrote:
Hi, DB_DataObject and DB_DataObject_FormBuilder can save me up to 30% of development time in one of my projects and I'd like to use them in this one as well as in earlier projects. However, this one needs a <select> input in the form with the possibility to select multiple items at the same time. In relational databases we store this using 1:N - N:1 relations with an additional table between them. (e.g. clients - clients_services - services). My problem is that I don't know if I implement such a feature should it be really in DB_DataObject or another class should be created using multiple DataObject-based components. I think the best would be to implement this in DB_DataObject so it could store the whole "client" form in one turn ($clienttable->insert()), and even DB_DataObject_FormBuilder can use it to generate the corresponding html element..
Mmmh, can you show some example scenario that explains how you want to use this exactly? What kind of element should be created to realize a represantation of an N:N relationship? Regarding the DataObject part, I think Fabien Franzen has been working on some DataObject enhancement that allows such relations pretty easily. Maybe you want to contact him and ask how he did it?
If anyone could help me on how to do this, I'd be happy to implement it in both DB_DataObject and DB_DataObject_FormBuilder and post it to the list. Any ideas are welcome.
I'll surely try :-) CU Markus

« previous php.pear.dev (#22661) next »