[Dbix-class] last insert id problem with Oracle
Christopher H. Laco
claco at chrislaco.com
Sat Jul 8 00:51:33 CEST 2006
Anthony Lincoln wrote:
> 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");
> }
> }
I'll play.
1. Show us your ResultSource class for the table in question.
2. Is that class loading PK::Auto?
3. Is that class loading PK::Auto in the right order?
-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060707/d907c2a8/attachment.pgp
More information about the Dbix-class
mailing list