• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

One to Many Mapping : Table not found

 
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?
 
Ranch Hand
Posts: 230
1
jQuery Spring Java
  • 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 !
 
Don't listen to Steve. Just read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic