-
-
Notifications
You must be signed in to change notification settings - Fork 610
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I don't see a way to declare a property as a foreign key (not as a mapped property à la @ManyToOne and friends), which for reasons is something I'd like to do (I'm using dataloader with GraphQL so I mostly am just using Mikro as an easier, type-safe-ish way to access the database).
Describe the solution you'd like
A way to declare a property as a foreign key without doing data mapping.
@Property({
columnType: "int",
references: "users(id)"
})
userId: number;Alternatively, the ability to specify custom constraints (eg as SQL) would be good enough.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the feature request here.
RossmacD, henqx, atzcl, awHamer, slnz00 and 3 moreawHamerawHamerawHamer
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request