We use a base class for all our AR entities. The base class has an ID
as the PK:
[PrimaryKey(PrimaryKeyType.HiLo, Params = "max_lo=19")]
public virtual long ID
{
get { return m_ID; }
protected set { m_ID = value; }
}
I'm working on one particular entity and do not want the ID as the
primary key, so in this entity I made an override:
[Property(IsOverride = true, Insert = false, Update = false)]
public override long ID
{
get{return base.ID;}
protected set{base.ID = value;}
}
This does not work, in the HBM.XML file that gets generated I see:
<id name="ID" access="property" column="ID" type="Int64" unsaved-
value="0">
<generator class="hilo">
<param name="max_lo">19</param>
</generator>
</id>
Can I take it that IsOverride=true doesn't work in the case of the
primary key attribute ?
If so, how can I achieve my aim ?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.