On 1/15/07, Cory Bennett <[EMAIL PROTECTED]> wrote:
> I am not sure what I am missing. I have a Product with relation like:
> blocks => {
> type => 'one to many',
> class => 'Block',
> column_map => { product_id => 'product_id' },
> },
>
> But when I try the "add_blocks" function it does not seem to exist:
>
> use Product;
> my $p = Product->new(id => 1)->load;
> $p->add_blocks({name => "testing"});
>
> Can't locate object method "add_blocks" via package "Product"
> Rose::DB::Object::AUTOLOAD('Product=HASH(0x1a7039c)', 'HASH(0x224b778)')
> called at ./product.t line 42
Everything there looks right to me. One possible cause of errors like
this may be a syntax error in a related module (e.g., Block.pm). Due
to the way that RDBO sometimes has to defer relationship creation,
errors in modules loaded on-demand are not always propagated. (The
trouble is how to distinguish between a missing module or class, and
one that exists but has errors in it. String matching on $@ is not
fun...)
If you're sure there are no syntax errors in any modules involved, can
you post a small, self-contained example that reproduces the bug?
-John
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object