• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between JoinColumn and mappedBy

Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although i know that, if there is uni directional relationship between two table's we use like this-

@JoinColumn(name="CarBillingId", referencedColumnName="car_billing_id", updatable=false)
protected CarBillingInfo carBillingInfo;

but if there is bidirectional relationship we use like this-


protected Car car;

but when i see the Apache Derby Database, the result's alook same(both car and carbillinginfo table's have same relationship in both ways). So what is the real difference between them which i can see.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!