Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Update Primary Key with DBIx::Class

by talexb (Chancellor)
on Sep 18, 2019 at 21:23 UTC ( [id://11106355]=note: print w/replies, xml ) Need Help??


in reply to Update Primary Key with DBIx::Class

It may not be possible to change the value of a record's primary key.

Perhaps what you can do instead is to create a new record from the old record, but store it with a new primary key -- then delete the record with the old primary key. That will work out to the result it sounds like you are looking for.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

  • Comment on Re: Update Primary Key with DBIx::Class

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found