AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

PLINQO for nHibernate: Add support for one to one association mappings. #600

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The templates should generate one to one mappings in the hbm and generated 
entities: http://ayende.com/blog/3960/nhibernate-mapping-one-to-one

Original issue reported on code.google.com by bniemyjski on 3 Aug 2011 at 6:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There are currently two work-arounds to get around this limitation until these 
changes have been made. The first work around would deal with updating the HBM 
with the one-to-one information as we preserve custom changes to the HBM files 
on regeneration. The next step would be to place the association properties in 
the non-generated partial class (E.G., Entities\MyEntitiy.cs).

The second work around would be to update the HBM template 
(CSharp\Internal\Hbm.Entity.cst) and CSharp\Internal\Entity.Generated template 
with the respected one-to-one association code. Next, one would need to update 
and recompile the Source Project to load the new one-to-one associations. This 
would need to take place around line 121 of the 
PLINQO-NH/Source/CodeSmith.SchemaHelper.NHibernate/NHibernateEntity.cs class 
file.

Original comment by bniemyjski on 3 Aug 2011 at 6:56

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 3 Aug 2011 at 7:51