Proxy values on new entities

Hello!

I call Create on a mapped class that has a Proxy property field.
Aurelius creates the getter and setter on the value.
I have another entity of the same type that I want to assign to this newly created entity, but I receive an access violation when I try to set the value.

To simplify the kind of code, it's along these lines:

begin
  NewEntity: TEntity.Create;
  SubEntity := ObjectManager.Find<TSubEntity>(ID);
  NewEntity.SubEntity := SubEntity;
end;

The actual code is more convoluted (there are loaders and other things) but this is the gist.
Is there anything specifically wrong that I am missing?

Thanks!

I see nothing wrong with the code you provided, so my guess is that problem is somewhere else.