Hi

(sorry for the abortive email earlier, dammed tab key )

When creating a new row and also creating rows in a related has_many
or has_one resultset, how do you set the FK in the related table.
In this example, artist_id.


my $artist = {
  name => 'the smiths',
  cds => [
       {title => "hatful of hollow", artist_id => },
       {title => 'meat is murder', artist_id => },
     ]};


Similarly, should I be using 'last_insert_id +1 ' on the artist table
to set it's PK or does DBIx::Class::Core take care of that?
TIA,
Dp.

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to