The requirement for "generated" attribute solves the possible problem of inconsistency. On change hibernate just needs to fetch or proxy the new referenced entity. Same behavior as for normal properties with generated attribute.
My application validates and sets it, but data could be manipulated directly in database or other applications.
|