Maps the property to db using a NHibernate's ICompositeUserType.

Namespace: Castle.ActiveRecord
Assembly:  Castle.ActiveRecord (in Castle.ActiveRecord.dll)
Version: 1.0.3.0

Syntax

C#
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets.Property)]
public class CompositeUserTypeAttribute : WithAccessAttribute

Remarks

You should specify the column names and the ICompositeUserType implementor.

Examples

CopyC#
[CompositeUserType(typeof(DoubleStringType), new string[] {"Product_FirstName", "Product_LastName"})]
public string[] Name
{
    get { return name; }
    set { name = value; }
}
or
CopyC#
[CompositeUserType(
    typeof(DoubleStringType), 
    new string[]{"Manufacturer_FirstName", "Manufacturer_LastName"}, 
    Length = new int[] {4, 5} )]
public string[] ManufacturerName
{
    get { return manufacturerName; }
    set { manufacturerName = value; }
}

Inheritance Hierarchy

System..::Object
  System..::Attribute
    Castle.ActiveRecord..::WithAccessAttribute
      Castle.ActiveRecord..::CompositeUserTypeAttribute

See Also