[Dbix-class] DynamicSubclass and Preview: conflict?

2010-04-29 Thread Miquel Ruiz
Hi everybody, I'm having some problems using together (in the same result class) the DynamicSubclass and Preview components. Maybe someone can point out what's going on (and maybe someone can point out how to solve it :)). I have a result class Item, with three subclasses: Service, Component

[Dbix-class] Re: DynamicSubclass and Preview: conflict?

2010-04-29 Thread Miquel Ruiz
Hi, There was a mistake in the file schema.sql in the previous test case. Attached is the correct one. Sorry for the inconvenience. Regards, -- Miquel Ruiz On 29/04/2010 16:04, Miquel Ruiz wrote: Hi everybody, I'm having some problems using together (in the same result class) the

[Dbix-class] inflate_results and source_name

2010-04-29 Thread Bill Moseley
Looking at the cookbook for inflate_result, does the source_name need to be explicitly set somehow? I'm a bit confused because it is getting set to one of the new classes, but the same for all. Added to Track class: package MyApp::Result::Track; ... sub inflate_result { my $self = shift;

Re: [Dbix-class] Subclass a Result class.

2010-04-29 Thread Bill Moseley
On Wed, Apr 28, 2010 at 7:27 AM, Matt S Trout m...@shadowcat.co.uk wrote: For that to happen the $session_attendee needs to be specific to a given session (Session id is stored with the $session_attendee instance). You just answered your own question. You want a result from the many-many

Re: [Dbix-class] Subclass a Result class.

2010-04-29 Thread Matt S Trout
On Thu, Apr 29, 2010 at 12:49:30PM -0700, Bill Moseley wrote: On Wed, Apr 28, 2010 at 7:27 AM, Matt S Trout m...@shadowcat.co.uk wrote: For that to happen the $session_attendee needs to be specific to a given session (Session id is stored with the $session_attendee instance). You just

Re: [Dbix-class] DynamicSubclass and Preview: conflict?

2010-04-29 Thread Matt S Trout
On Thu, Apr 29, 2010 at 04:04:19PM +0200, Miquel Ruiz wrote: Hi everybody, I'm having some problems using together (in the same result class) the DynamicSubclass and Preview components. Maybe someone can point out Do your subclasses have their own columns? I'm thinking that the source for

Re: [Dbix-class] inflate_results and source_name

2010-04-29 Thread Matt S Trout
On Thu, Apr 29, 2010 at 10:58:11AM -0700, Bill Moseley wrote: Looking at the cookbook for inflate_result, does the source_name need to be explicitly set somehow? I'm a bit confused because it is getting set to one of the new classes, but the same for all. source_name is a proxy through to the