Your right, I use the documents pk as the eventprofile PK.
The way to set it programatically does work, but if I do it this way, I have to save each entity on its own. But I want to safe both objects at once.
Or is it the standard-way to safe each object in a One-To-One relation on its own?
I found a way to do safe the relation at once by using the method "persist" instead of "merge".
But now I am a little bit confused, because Many-To-One or One-To-Many relations can be persist by using "merge".
Do you know why merge does not work for One-To-One?
Nothing up my sleeve ... and ... presto! A tiny ad: