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
Code:
public class Writer implements java.io.Serializable {
private long id;
private String name;
private Set stories ;
Code:
public class Story implements java.io.Serializable {
private long id;
private Writer writer;
private String info;
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??