Hi guys,
may I have some additional questions about hibernate?
Lets consider the next scenario:
Code:
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class Boat implements Serializable { ... }
@Entity
public class Ferry extends Boat { ... }
@Entity
@PrimaryKeyJoinColumn(name="BOAT_ID")
public class AmericaCupClass extends Boat { ... }
1) In the case of AmericaCupClass entity, is somehow possible to set the parent entity(BOAT)???? I mean, Hibernate doesn't allow you to set BOAT_ID, it throws "Repeated column in mapping for entity: boatId (should be mapped with insert="false" update="false")"
2) Is somehow possible to attach AmericaCupClass entity to an EXISTING instance of Boat? Without using of association? I kinda have a feeling that it's not possible...
Best Regards
[/code]