Hello Ranchers,
thanks for your replies. I found the error with your hints at the ID. I've made a fault AND
Jboss has a curious behavier.
The ID was auto-generated from my database (MS SQL Server)
and therefore I couldn't set the ID myself. I overlooked this because I copied the entity from another example. :roll: Now that I don't set the ID the code works fine with persist().
BUT why does the Jboss server adds a new Cabin with the next new ID with merge(), when I set the ID myself to a different higher number and have auto-generated IDs? I think that there should come an error message like "cannot merge the entity, because no such ID in database"...
Sincerely
Mike