• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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/
 
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic