Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- B sa_id(key) s_id user pwd.
- @Entity class A...{
- @OneToMany(fetch=FetchType.EAGER)
- @JoinTable( name="A_B",
- joinColumns={@JoinColumn(name="a_id",
- table="a",unique=false)},
- inverseJoinColumns={@JoinColumn(name="b_id",
- table="b", unique=true)} ) Collection
- getB(){...} }
- @Entity
- class A{
- ...
- @OneToMany(fetch=FetchType.EAGER, mappedBy="s")
- Collection<B> x;
- }
- @Entity
- class B{
- @ManyToOne
- A s;
- }
- With these tables:
- A
- s_id(key) name cli type
- B
- sa_id(key) s_id(the keys from A) user pwd.
Add Comment
Please, Sign In to add comment