I have an existing POCO class library where all collections are stored in arrays. For example, the Customer class has an Invoice [] array for storing its invoices:
class Customer
{
public int ID;
public Invoice[] _invoices;
}
class Invoice
{
public int ID;
public int CustomerID;
public string SomeData;
}
I cannot change these classes, and I want to map them to an existing database using NHibernate.
I looked at the display <array>, but it looks like it needs an element <index>. In my database, the table [Invoice]does not have an index column. When Customer invoices are loaded, I do not expect them to be at any particular position in the array.
What are my options?
source
share