Replies: 2 comments
-
any help please? @RomainLanz @thetutlage 🥲 |
Beta Was this translation helpful? Give feedback.
0 replies
-
tbh, this doen't make sence for me, @hasOne(() => CourseFee)
public locals: HasOne<typeof CourseFee>
@hasOne(() => CourseFee)
public foreigners: HasOne<typeof CourseFee> you don't have to define relationships for each column, instead you should have for model, like this @hasOne(() => CourseFee)
public courseFee: HasOne<typeof CourseFee> and then you can create relation await course.fulltime.related('courseFee').create(payload) see hasOne docs also check updateOrCreate docs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I have a Course model who has
fulltime
.in
fulltime
I have 2 hasOne relations.in my controller I want to save
locals
andforeigners
so I'm doing this:but it saves locals for the 2 properties (fulltime.locals & fulltime.foreigners). How can I solve it?
Beta Was this translation helpful? Give feedback.
All reactions