Matt S Trout wrote:
> Anthony Lincoln wrote:
> 
>>Nope, no luck.  Autoincrement works fine with/without quoted $id, but I 
>>still get left with no $change->id.  I just upgraded to DBI 1.51, so I'm 
>>pretty sure it's not a version issue.
> 
> 
> Are you going to show us the rest of the code at some point? I mean, I could 
> use my psionic powers to magically figure out what's in your DBIC classes but 
> that's a commercial service only :)
> 

Fair enough.  Here's the offending snippet, and let me know if you need 
more.  Like I said, the insert and autoincrement works fine; it's just 
the id that isn't there.  But I can view a list of items afterward, 
select the change I just made, and edit it no problem.

             my $change = $model->update_or_create({
                 ID => $id,
                 owner => $user_id,
                 name => $hash{name},
                 prereq_id => $hash{prereq_id},
                 dependent => $hash{dependent},
                 description => $hash{description},
                 backout_plan => $hash{backout_plan},
                 visibility => $hash{visibility},
                 risk => $hash{risk},
                 sys_criticality => $hash{sys_criticality},
                 sys_affected => $hash{sys_affected},
                 qa_difficulty => $hash{qa_difficulty},
                 install_difficulty => $hash{install_difficulty},
                 problem_visibility => $hash{problem_visibility},
                 completed => $hash{completed},
                 creator => $creator,
             },{ key => 'primary' }
             );

             if ($change) {
                 if (!$change->id) {
                     $c->log->debug("no change id");
                }
            }

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

Reply via email to