Hi all,
Looking at the entity bean relationships chapter in the head first
ejb book I have a question concerning the MovieBean/Director example.
In the MovieBean instead of mapping the directorId db field to an abstract getter/setter it has used a cmr field for director so you can link to the Director bean instead of just the db foreign key id. This is great, but I'm just wondering when you create a new MovieBean (and a new row in the db), the ejbPostCreate method is called (where you call the setDirector with the corresponding Director entity) how the db will know to insert the directorId from the DirectorBean into the newly created Movie db row (giving it the correct fk).
Hope this is clear, not overly sure if its clear in my head to be honest!!
Thanks
Chris