Automatic foriengKey population on HasMany and HasOne relations