• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate One to Many Bidirectional with assigned as Primary Key

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , I am struck up here . Please somebody help me

I am trying to use Hibernate One to Many Bidirectional with assigned as Primary Key






Inside my client class I am

Story story = new Story();
story.setId(1234);
story.setInfo("Some");
story.setWriter();// I can't create Writer Object .


Writer writer = new Writer();
writer.setId(123);
writer.setName("Some");
//writer.setStories(stories) // I need a story Object here


Please help me , is it not possible to use assigned as Primary Key with One to Many Bidirectional??
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry for my foolish query . Please don't reply to this one .
 
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!