Let us say we have a link, Link.newLink(Pizza.cheeseId, Cheese.id), so Pizza has a foreign key to Cheese.
Now if I say jpaContext.createAndPersist(Entity.of(Pizza.class).with(Pizza_.cheeseId, 123)), it should load existing Cheese Entity with id 123. and not try create another Cheese.
Let us say we have a link, Link.newLink(Pizza.cheeseId, Cheese.id), so Pizza has a foreign key to Cheese.
Now if I say jpaContext.createAndPersist(Entity.of(Pizza.class).with(Pizza_.cheeseId, 123)), it should load existing Cheese Entity with id 123. and not try create another Cheese.