Seems to me you should first create the user (in a separate transaction), then use the reference in the UserInterest insert
Tobias G. Waaler
08/23/2020, 11:29 AM
Because user uses a UUID, you could actually create it in the same transaction, as is described in the wiki. But in general, creating the entities you reference first, should work