[Dbix-class] many-to-many w/ attributes
Hermida, Leandro
Leandro.Hermida at fmi.ch
Mon Sep 18 10:39:24 CEST 2006
My apologies -- I should have put an example of the typical many-to-many
w/ attributes that I always see. A couple examples from data I have
recently modeled:
create table srna_sequence (
id INT NOT NULL PRIMARY KEY,
... more columns ...
);
create table precursor (
id INT NOT NULL PRIMARY KEY,
... more columns ...
);
create table srna_sequence_precursor_location (
srna_sequence_id INT NOT NULL,
precursor_id INT NOT NULL,
arm VARCHAR(30) NOT NULL,
position INT NOT NULL
);
-- or --
create table experiment (
id INT NOT NULL PRIMARY KEY,
... more columns ...
);
create table sample (
id INT NOT NULL PRIMARY KEY,
... more columns ...
);
create table experiment_sample (
experiment_id INT NOT NULL,
sample_id INT NOT NULL,
ordinal_position INT NOT NULL
);
So for many-to-many w/ attributes like these, is the example on
http://dbix-class.shadowcatsystems.co.uk/index.cgi?ManyToManyWithAttribu
tes the recommended way to set up using the latest DBIx::Class 0.07002?
Leandro
________________________________
From: dbix-class-bounces at lists.rawmode.org on behalf of Matt S Trout
Sent: Fri 9/15/2006 10:47 PM
To: dbix-class at lists.rawmode.org
Subject: Re: [Dbix-class] many-to-many w/ attributes
Hermida, Leandro wrote:
> Hello,
>
> Is the example shown in
>
http://dbix-class.shadowcatsystems.co.uk/index.cgi?ManyToManyWithAttribu
tes still
> the recommended way to set up many-to-many with attributes when using
> DBIx::Class 0.07002?
It's *a* way that works.
It's impossible to say whether it's what we'd recommend when you've
given us
no information at all about your design contraints :)
--
Matt S Trout Offering custom development, consultancy and
support
Technical Director contracts for Catalyst, DBIx::Class and BAST.
Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more
information
+ Help us build a better perl ORM:
http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive:
http://www.mail-archive.com/dbix-class@lists.rawmode.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 8876 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060918/7fff1639/attachment.bin
More information about the Dbix-class
mailing list