-
Question: the docs sometimes have e.g.
and sometimes
Is there a reason for the difference? Also, is this the best place to ask questions, or is there a forum or chat or something? Or should I use StackOverflow? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Ok, so I enabled the github discussions as a place for asking questions and discussing changes etc. The annotations are totally optional and everything will work as expected without them. You always get in return (for FK field): but you can initialize a related model in several ways:
So when you put Probably I should provide some kind of custom type with overloading to annotate relations but as you can see above it is not trivial. |
Beta Was this translation helpful? Give feedback.
Ok, so I enabled the github discussions as a place for asking questions and discussing changes etc.
The annotations are totally optional and everything will work as expected without them.
The relations fields are actually quite complex and hard to annotate as they behave like this:
You always get in return (for FK field):
ormar.Model
instance or Nonebut you can initialize a related model in several ways:
ormar.Model
instance (pass Department instance in example above)So when you put
department: Optio…