This project is read-only.

Creating several Fields of the same record type in Orchard

Topics: General, Writing modules, Русский (Russian)
May 11, 2012 at 11:25 AM

Imagine you have O1Rcord and UserRecord.

O1Record has Fields CreatedBy_Id, ModifiedBy_Id, DeletedBy_Id

I want to reference from these fields to UserRecord. Orchard by default supports UserRecord_Id name only.

How to implement this functionality in Orchard?

May 12, 2012 at 12:46 PM

Although I don't know an answer for your question, you could try to ask it on some NHibernate board/forum or on StackOverflow too. This automatic foreign key binding is a feature of NHibernate.

May 15, 2012 at 10:59 AM
Edited May 15, 2012 at 11:03 AM

I created

in Models class


virtual UserRecord CreatedBy {get;set;}

virtual UserRecord ModifiedBy {get;set;}

virtual UserRecord DeletedBy {get;set;}


and in migration:

...Column<int>("CreatedBy_Id").Column<int>("ModifiedBy_Id").Column<int>("DeletedBy_Id") ...

that works, but

additional I need the Foreign Keys and Indexes and it is not an issue.