What nhibernate mapping is used for string[] in an entity?

前端 未结 2 831
小鲜肉
小鲜肉 2021-01-24 00:42

I have a strange situation I need to persist:

public class Person
{
  public string[] Nicknames { get; set; }
}

What mapping and table structur

2条回答
  •  野性不改
    2021-01-24 01:45

    You can map arrays directly, but you'll need a few additional columns:

    
     
      
       
      
    
    

    If you don't have the other columns you need, I would probably persist it as a normal bag or list and expose it as an array from that in the entity.

提交回复
热议问题