Using the helpers, I created a Model Bar

tmp_server lists all of its classes and instances like such...

| TMP::Model::Bar                                          | instance |
| TMP::Model::Bar::Bar                              | class    |
| TMP::Model::Bar::HeHe                             | class    |
| TMP::Model::Bar::HaHa                              | class    |

This continues for every table in the schema. Each has a prefix of Bar.

if I create another model using the helper, called Foo, with the same
schema object, it repeats. Every table in the schema, prefixed with
Foo.

I can only load the resultsets by calling $c->model("Bar::Bar")
I can only load the result set by calling $c->model("Foo::Foo")

This looks ugly and will get even uglier I am sure as the app grows.

Haven't been able to avoid this behavior.  Is there a good reason for
this or am I making a mistake?

Thank you in advance.  Below is some sample code

---

Package TMP::Schema;

use base qw/DBIx::Class::Schema DBIx::Class::AccessorGroup/;

__PACKAGE__->mk_group_accessors(simple => 'context');
__PACKAGE__->load_classes( qw// );

1;

---

Package TMP::Model::Bar;

use strict;
use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(
   schema_class => 'TMP::Schema'

.....

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to