it's pactuul@gmail.com
Sorry about the late reply as I've been swamped with coding projects.
On a second look at it, once I started using the gennit code in a project I noticed what you noticed: that the code works as intended, if you swap the guid's in each column. The xml mappings seem to be fine. So its quite possible that I've misunderstood how to use the tables and/or code.
So a quick recap. With no modifications to the generated code and sql tables it appears that the foreign keys are needing to be swapped as we discussed. I.E. Creating a store in the Store Table and an employee in the employee table requires that I put the employee's guid in the storeid column in Store_Employee and the store's guid in the employeeid column..
If I do this the code works fine and nhibernate's mapping seems to be working properly with the relationships on my select statements.
The nhibernate mapping in store.hbm.xml looks correct (key column = employeeid is correct). As in:
<set access="property" lazy="true" name="Employees" table="Store_employees">
<key column="EmployeeID" />
<many-to-many column="StoreID" class="Core.Domain.DataAccess.Employee, Core" />
</set>
It throws me off though that the guids in the store_employee table are needing to be "swapped".
Posted 31 Oct 07 in GENNIT Code Generation
Great site. I really enjoy using it well worth at least $10 to me. Couple of thoughts: Is there away to change the depth (z-index?) of any of the classes I'm making? Also to help facilicate faster input, can you make a short cut to the Add field button. Slows me down having to type the field name, hit enter, then the first letter of the type (nice short cut by the way) and then have to manually click the 'add + ' button.
Also I think it would be handy to have a way to drag a table header to a column header of another table to specify a "many-to-one" relationship automatically.
Posted 13 Oct 07 in GENNIT Code Generation
Total Messages: 5
Topics Created: 1