Re: has_many relationships to tables with one non-key field
[prev]
[thread]
[next]
[Date index for 2005/02/20]
On Wed, Mar 05, 2003 at 09:11:26PM +0000, Tim Bunce wrote:
> We have lots of tables that represent objects that then have
> 'satellite' tables that just contain a key field plus one data field.
> These satellite tables are a normalized implementation of object
> attributes that are naturally lists. Rather than use a varchar field
> in the parent object table and put a comma-separated list in there,
> they are normalized out into a separate table.
> What I want to do is make it very simple to declare this specific
> kind of relationship and automatically have an accessor that returns
> a list as an array ref, and a mutator that accepts an array ref and
> then automatically works out what insert/delete statements are
> needed to implement the change.
Working back through my old 'flagged' CDBI emails...
I'm assuming that the current Relationship mechanism should make it
possible for you to do things like this without any changes to the CDBI
core now.
Does this sound correct?
Tony
|
Re: has_many relationships to tables with one non-key field
Tony Bowden 09:56 on 20 Feb 2005
|