c# - Mapping a component with a collection of value objects -
c# - Mapping a component with a collection of value objects -
how map (using xml-based approach) value object (component)
contains iset<string>
property?
[serializable] public class contact { public iset<string> phonenumbers { get; set; } public string email { get; set; } }
thanks!
use element
.
<set name="phonenumbers" table="phone_numbers"> <key column="contact_id"> <element column="phone_number" type="string"/> </set>
if you're going utilize phonenumbers property displaying purpose, consider "cheaper" approach serializing data, without separate table , separate query fetch collection.
c# nhibernate orm collections value-objects
Comments
Post a Comment