• Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity Relationship

 
Sagar Kar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think of the Movie and Trailer example.
Think of it as an one to one bidirectional relationship.
There is a movie M1 and a trailer T1.
M1.getTrailer() will give T1 and T1.getMovie() will give M1.
Now suppose I do something like the following....
M1.setTrailer(null);
After the execution of this statment will T1.getMovie() return null or is it still going to return M1?


Thanks and regards,
Sagar Kar
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!