Win a copy of Java Challengers this week in the Java in General forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Question on one to one bidirectional

 
Ranch Hand
Posts: 654
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: 23543
161
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: 2072
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?
 
All of the following truths are shameless lies. But what about this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic