• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Question on one to one bidirectional

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am trying to test bidirectiona. I am using spring CrudRepository

I have created two entities



And




running the test


Brings back customer and a null for customerAddress

 
Saloon Keeper
Posts: 26532
187
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This isn't actually a Spring thing. What you are asking about relates to the Java Persistence Architecture (JPA). Which is well-supported by Spring Data, but there's nothing specific to Spring Data here.

So I'm listing this post in our ORM forum where more experts on JPA can see it.

As far as it goes, I think that your mapping to Customer Address looks suspect, but I'm preoccupied at the moment.
 
Bartender
Posts: 2264
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Tony,
How do you save the customerAddress  to the repository?
 
reply
    Bookmark Topic Watch Topic
  • New Topic