You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importrouterfrom'@adonisjs/core/services/router'importUserfrom'#models/user'import{DateTime}from'luxon'router.get('/',async()=>{constuser=awaitUser.create({})console.log(user.userId)// ✅ valid// trying to update any attribute failsuser.createdAt=DateTime.now()awaituser.save()// fails to update, as it's checking for `user.user_id` instead of `user.userId`})
Package version
21.3.0
Describe the bug
TL:DR;
selfAssignPrimaryKey
doesn't take into consideration of the naming strategy when finding the primary key valueDescription
Reproduction repo
https://github.com/radiumrasheed/lucid-issue-1
The text was updated successfully, but these errors were encountered: