Hi.
It's possible to create a relationship (1to1, MtoN, 1toN) between two object
without creating the foreing key constraint in the linking column?
ES:
Two Object, Person and Car. Suppose that a Person can have only 1 car at time.
I make a 1 to 1 unidirectional association between Person and Car without
ownership so Person can exist without a Car also Car can exist without a Person.
Code
@Entity
@Table(name = person)
public class PersonEntity implements Person {
@OneToOne
private CarEntity car;
.
}
@Entity
@Table(name = car)
public class CarEntity implements Car {
.
}
If I Deploy this code i found a colunm in Person table (Car_id) with the
foreing key constraint on, so it's impossible to delete a car associated with a
person and cathing the dangling reference by myself.
Can i delete the foreing key constraint with Ejb annotation?
thanks.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3952438#3952438
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3952438
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user