I have a setup similar to this...

Class B inherits from class A and class C has a relationship to A.
A and B share the same table and use the dynamic sub-classing approach in
the DBIC cookbook to get the sub-classing to work.

When testing directly with the schema the classes behave as I would expect,
ie. I can set the relationship on C using an object of class either A or B.
However, when I use the schema inside my Catalyst app I get an error like
this when trying to set the property using the relationship on A to an
object of the sub-class C...

DBIx::Class::MyApp::new(): Object MyApp::Model::DBIC::A::B=HASH(0x392b6a0)
isn't a MyAPP::Model::DBIC::A (The error is generated in
DBIx::Class::Relationship::Base::set_from_related)

It seems that the B isa A relationship is not preserved within the
MyApp::Model namespace.

The model works correctly in all other ways (so far).

Any ideas on how to get round this are extremely welcome  :)  I can post
real code if required.

Cheers,

Scott.
_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to