posted 10 years ago
I am new to JPA and need some help understanding persisting JPA parent entity along with it's child (through Mapping).
Say I have following two entities
Now I am trying to save Employee setting Address Entity to it.But it throws a foreign key validation exception because e_id is auto_increment and is generated by database while save.
Does JPA provide some mechanism to handle this ?