Closed GoogleCodeExporter closed 9 years ago
Original comment by bniemyjski
on 14 Oct 2008 at 3:30
If you try AdventureWorks with the latest nHibernate template you'll find some
of the
generated code is duplicated where more than one foreign key exists for the same
table e.g. SalesOrderHeader and Address has BilltoAddress and SaletoAddress
relationships. I get a private member generated twice. Private member variables,
properties and hbm files are all affected.
I tried the latest nightly build as I noticed that the readme states this (or
similar
bug) is fixed, but no joy. A dirty fix is to add the MemberColumnSchema.Name
property
onto the generated code in question - this enforces uniqueness - which
eventually
allowed me to compile but the tests dont work now. I'm getting
FKUnmatchingColumnsException errors.
private Employee _employee
changes to...
private Employee _employeeManagerId
which isn't a great naming convention to identify the employee's manager. Can
anyone
recommend a better fix?
http://community.codesmithtools.com/forums/t/8951.aspx
Original comment by bniemyjski
on 14 Oct 2008 at 3:35
We recognize that this is an issue, and it has been added our backlog.
It is on my schedule to try and resolve this issue by next week; I will provide
an
update when it's finished.
Thanks,
Tom
Original comment by tdupont...@gmail.com
on 14 Oct 2008 at 6:30
I am glad to report that we have done a large update on the back end of our
NHibernate templates!
We should now have better logic that prevents duplication of columns and
associations
in the business entities.
However, the main problem we were experiencing was with Composite Foreign Keys,
and
unfortunately we have not yet been able to resolve all of these issues.
Thus, we do not currently support generating associations for Composite Foreign
Keys,
instead we generate those columns as properties.
We hope you enjoy these updates; please keep the great feedback coming!
Thanks,
Tom
Original comment by tdupont...@gmail.com
on 28 Oct 2008 at 8:53
Original comment by shannon....@gmail.com
on 6 Oct 2009 at 5:23
Original issue reported on code.google.com by
bniemyjski
on 14 Oct 2008 at 3:21