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
If I Create a model with a valid uuid id, Pop creates the model with the id given. However, if I Create a model with a non-zero (or valid) integer id, Pop ignores the id completely. This restricts me from implementing the common polymorphism pattern (Where I use same integer for id field in two or more tables)
Steps to Reproduce the Problem
Model with a integer ID field
model := Model{}
model.ID = nonzero
db.Create(&model)
Expected Behavior
Pop creates the model with the given id
Actual Behavior
Pop ignores the given id
Here's the SQL statement in the log:
INSERT INTO posts (created_at, updated_at, user_id) VALUES (:created_at, :updated_at, :user_id) returning id
Info
Latest (v4.11.0) pop
Postgresql
The text was updated successfully, but these errors were encountered:
Description
If I Create a model with a valid uuid id, Pop creates the model with the id given. However, if I Create a model with a non-zero (or valid) integer id, Pop ignores the id completely. This restricts me from implementing the common polymorphism pattern (Where I use same integer for id field in two or more tables)
Steps to Reproduce the Problem
Expected Behavior
Pop creates the model with the given id
Actual Behavior
Pop ignores the given id
Here's the SQL statement in the log:
Info
Latest (v4.11.0) pop
Postgresql
The text was updated successfully, but these errors were encountered: