[Dbix-class] has_one joining through another table
Matt S Trout
dbix-class at trout.me.uk
Wed Jun 27 01:06:45 GMT 2007
On Tue, Jun 26, 2007 at 04:30:26PM -0700, Marc Mims wrote:
> * Steve Francia <steve at takkle.com> [070626 16:00]:
> > Sadly, that is the way we had it, we decided to switch to using the
> > owner flag to try to eliminate duplication of data in the database.
>
> At least in the problem you presented, I don't see the data duplication
> problem with a foreign key to the user table in the picture table. The
> key itself would exist in both the picture table and the user_picture
> table, but I think that is a natural consequence of the relationships.
Actually, I'd probably have the owner_id be part of a compound FK to
user_picture rather than user - enforces that that link exists ...
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
More information about the Dbix-class
mailing list