maggio 2009 Blog Posts

NHibernate – inverse attribute

Il mapping in file hbm è un’attività che non faccio spesso, ma quando la faccio mi scordo sempre se e come usare l’attributo “inverse” nelle collection. A futura memoria segnalo questo post  di Brian Chavez che mi sembra più esauriente della documentazione ufficiale di NH. Suppose you have ParentTable (parentId PK, parentcol1, parentcol2) and ChildTable(childid PK, parentid FK, childcol1, childcol2).  In a one-to-many relationship, you will have one parent and many children.  The ChildTable has a primary key and foreign key.   The foreign key is a reference to the primary key in the ParentTable.  If...

posted @ lunedì 25 maggio 2009 18:18 | Feedback (1)