• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Creating Relationships like one to many and vice versa, one to one and many to many in SPRING JDBC.

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

In hibernate we have annotations/xml to create one to many/vice-versa, many to many and one to one relationships and then to persist.

But how can we achieve this in Spring Data support? Please give me any link about this(with complete explanation) or explain me by taking small example like


E.g. assume this model:

Customer (customerId, name, age, ...)
Address (customerId, type, street, city, ...)

PaymentOption (customerId, cardnumber, cardtype, ...)



Thanks:
Ramakrishna K.C
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want ORM, don't use Spring Data JDBC. Use Spring Data JPA instead. http://projects.spring.io/spring-data-jpa/
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic