Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

One to Many Mapping : Table not found  RSS feed

 
Rashmee Kulkarni
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to get hands on on @OneToMany relationship. But I am getting following error :




Here is my code :

UserDetailsDTO.java




Vehicle.java




Address.java



Following is Test code:




I am using Access database. OneToOne and ManyToOne relationships are working fine.


Can anyone please throw light on whats going wrong here?
 
Mohammed Sardar.
Ranch Hand
Posts: 126
1
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But why @ElementCollection is not working but @OneToMany working. Is EC replaced by @OneToMany ?
@OneToMany(targetEntity=Address.class, mappedBy="", fetch=FetchType.EAGER)
private Set<Address> listOfAddresses = new HashSet<Address>();
Actually mappedBy column should be empty or else it's not working !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!