Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Can't call method "find" on an undefined value

by stonecolddevin (Vicar)
on Jan 25, 2012 at 20:38 UTC ( #949961=note: print w/ replies, xml ) Need Help??


in reply to Can't call method "find" on an undefined value

Your result class is called "package AddressBook::Schema::AddressDB::Result::Address;", but you're calling "Addresses". Try changing that in your model call.

Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past


Comment on Re: Can't call method "find" on an undefined value
Re^2: Can't call method "find" on an undefined value
by Anonymous Monk on Feb 20, 2012 at 06:31 UTC
    it should be $address = $c->model('AddressDB::Address')->find({id => $address_id});

      If it's the primary key you don't have to specify the column name

      Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://949961]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-09-23 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls