-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Hello,
I tried to embed a struct that contained a foreign key, but instead a getting a foreign key, the model got a jsonb field. For example, this code would trigger this problem :
type SoftDeleteMixin struct {
Deleted bool
DeletedAt *time.Time
DeletedBy *User `fk:"user_id,inverse"`
}
type Subject struct {
kallax.Model `table:"subjects" pk:"id"`
kallax.Timestamps
SoftDeleteMixin
[...]
}Which results in this code being generated:
CREATE TABLE subjects (
created_at timestamptz NOT NULL,
updated_at timestamptz NOT NULL,
deleted boolean NOT NULL,
deleted_at timestamptz,
deleted_by jsonb
);Do you have an idea of what's happening here ?
Thank you,
Benjamin
Metadata
Metadata
Assignees
Labels
No labels