How can I stop Fluent NHibernate automapping from creating foreign keys across the database? -


i using latest version of fluent nhibernate automapping. there convention or property can set stop creating foreign key constraints across tables? have 200 classes, cannot go each individual class , property name , set

 foreignkeyconstraintnames("none", "none")  

how can add foreignkeyconstraintnames("none", "none") in automapping? don't want hardcode table name or column name. have automapping create mappings without foreign keys. basicall don't create foreign keys across database. how can this? there similar post here answer not clear me.

a simple convention

public class noforeignkeys : ireferenceconvention, ihasmanyconvention {     public void apply(imanytooneinstance instance)     {         instance.foreignkey("none");     }      public void apply(ionetomanycollectioninstance instance)     {         instance.key.foreignkey("none");     } }  // use automap.assemblyof().conventions     .fromassembly() or .add(typeof(noforeignkeys)) 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -