[Dbix-class] modelling problem

2012-10-16 Thread David Schmidt
I fail to implement the following scenario properly with DBIC | User1 | Test1 | Test2 | Step1 | Step2 | Test3 -) There are Users. -) A User has_many Tests. -) A Test has_many Steps. -) Steps have a 'type' attribute. -) A Step of type 'SubTest'

Re: [Dbix-class] DBIx::Class::Tree::NestedSet

2010-12-18 Thread David Schmidt
On Sat, Dec 18, 2010 at 7:20 AM, linuxsupport lin.supp...@gmail.com wrote: Hi, Can someone provide me a real example of Tree::NestedSet? Thanks ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class

Re: [Dbix-class] query for m:n relation

2010-10-03 Thread David Schmidt
On Sun, Oct 3, 2010 at 4:59 PM, Charlie Garrison garri...@zeta.org.au wrote: Good morning, On 3/10/10 at 2:42 PM +0200, David Schmidt davew...@gmx.at wrote: How to express this query for DBIx::Class is beyond my still evolving DBIC skills. Without seeing some of your schema, real examples

[Dbix-class] many_to_many accessor returned object with undef column

2010-01-08 Thread David Schmidt
I add some roles, then add a user and give him some roles. if i want to print the roles using foreach ($user-roles) { print Role: . $_-name . , . $_-id . \n; } I get Role: admin, 1 Role: undef, 2 Role: undef, 3 If I use $_-get_column('name') I get Role: admin, 1 Role: user, 2 Role: project,

[Dbix-class] Re: many_to_many accessor returned object with undef column

2010-01-08 Thread David Schmidt
On Fri, Jan 8, 2010 at 2:46 PM, David Schmidt davew...@gmx.at wrote: I add some roles, then add a user and give him some roles. if i want to print the roles using foreach ($user-roles) { print Role: . $_-name . , . $_-id . \n; } I get Role: admin, 1 Role: undef, 2 Role: undef, 3 If I

[Dbix-class] convention for naming primary keys to avoid ambiguous selects

2008-11-25 Thread David Schmidt
Hello List, I used to have an id INTEGER PRIMARY KEY column in every table. Now I am using DBIC and repeatedly run into this kind of error. SELECT me.id, me.title, me.artist FROM cds me WHERE ( me.artist = ? ): '2' SELECT me.id, me.title, me.artist, artist.id, artist.name FROM cds me JOIN

Re: [Dbix-class] convention for naming primary keys to avoid ambiguousselects

2008-11-25 Thread David Schmidt
On Tue, Nov 25, 2008 at 5:31 PM, Octavian Rasnita [EMAIL PROTECTED] wrote: From: David Schmidt [EMAIL PROTECTED] Hello List, I used to have an id INTEGER PRIMARY KEY column in every table. Now I am using DBIC and repeatedly run into this kind of error. SELECT me.id, me.title, me.artist