tiagopeixoto wrote:
Sorry the english... I don't speak french.
I have the same problem posted here by liop.
Unfortunately, I could not understand what was written.
My question: Is the @NotFound annotation the only solution to optional associations ?
Thanks,
TCP
Well,
translated in english, what I wrote was that NULL is the normal value that you should find in the database for an foreign key that does not point to a foreign record.
So if you're working on a brand new project with brand new data, NULL is the way to go.
BUT if you're working with legacy data, you're only option is to use the @NotFound annotation if you don't consider modifying all your old 'foreign key 0 values' to 'NULL'.
Does that answer your question ?
Sylvain