[Dbix-class] create failures with has_one
Wallace Reis
wallace at reis.org.br
Thu Oct 15 10:53:23 GMT 2009
On 14/10/2009, at 13:10, Dermot wrote:
> DBIx::Class::ResultSet::update_or_create(): Object ARRAY(0x8f3f7a8)
> isn't a My::Schema::MotionDB::
>
> I created a small test to see if I could narrow it down but that is
> throwing this exception:
>
> DBIx::Class::ResultSet::update_or_create(): DBI Exception:
> DBD::SQLite::db prepare_cached failed: near "CONTRIB": syntax error(1)
> at dbdimp.c line 271 [for Statement "SELECT me.id, me.sub_id,
> me.contrib_id FROM clipData me WHERE ( ( ( ( me.id CONTRIB ID ? ) ) )
> )"] at t/test_update_or_create.t line 45
>
> my $record = {
> 'validation_pass' => 1,
> 'files' => [],
> 'active' => 1,
> 'name' => 'Gustav MR',
> 'clipdata' => [
> {
> 'contrib_id' => 2,
> }
> ],
> 'contrib_id' => 2,
> };
>
Use a HashRef for clipdata rel instead of a ArrayRef.
--
wallace reis/wreis Catalyst and DBIx::Class consultancy
with a clue
Software Engineer and a commit bit: http://shadowcat.co.uk/catalyst/
Shadowcat Systems Limited
http://www.shadowcat.co.uk http://www.linkedin.com/in/wallacereis
More information about the DBIx-Class
mailing list