Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Update Primary Key with DBIx::Class

by jcb (Parson)
on Sep 18, 2019 at 21:22 UTC ( [id://11106354]=note: print w/replies, xml ) Need Help??


in reply to Update Primary Key with DBIx::Class

While I normally use DBI and occasionally roll my own custom application-specific ORM layers when I need them, I will suggest checking the DBIx::Class documentation to see if there is a "commit" step that you might be missing. Your description sounds like you are finding the record in the DB and updating the copy in your program (and possibly in a pending transaction in the DB server) but not actually ever issuing the SQL COMMIT to make the changes durable in the DB.

Replies are listed 'Best First'.
Re^2: Update Primary Key with DBIx::Class
by Anonymous Monk on Sep 19, 2019 at 02:21 UTC
    This is most likely to be it. (An SQL monitor, if you have one, can confirm it.) You should be able to modify the primary-key value like any other column, but there could well be auto-commit behavior. As an experiment, try changing other columns with your existing code. (Use a very distinct value then search the whole table to see if it shows up anywhere at all.) If it doesn't, it's almost certain to be a missing commit.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-20 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found