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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -