Hi there,
I'm currently facing a problem I really can't help myself... "Reading the internet" hasn't really helped though it might be more than possible that someone else has faced that problem before. But I'm too stuck i guess... =)
I'm having a class Node which looks like this in the mapping file
Code:
<hibernate-mapping auto-import="false" xmlns="urn:nhibernate-mapping-2.2">
<class name="bsp1.Node, BinaryTreeAdvanced" table="`NODE`">
<id name="m_id" column="ID" type="integer" access="field">
<generator class="identity"/>
</id>
<property name="m_timestamp" column="TS" [b]type="MyTimestampType, pmMDA.NET.Common"[/b] not-null="false" access="field"/>
<property name="m_value" column="VALUE" access="field" type="Int32" not-null="false"/>
<many-to-one name="m_right" column="RIGHT_FK" class="bsp1.Node, BinaryTreeAdvanced" access="field" not-null="false"/>
<many-to-one name="m_left" column="LEFT_FK" class="bsp1.Node, BinaryTreeAdvanced" access="field" not-null="false"/>
</class>
</hibernate-mapping>
Now when i lazily load an object of type bsp1.Node a proxy is generated (as it should be - that's good so far). But somehow the m_timestamp property isn't included in this generated proxy.
Am i totally wrong in my assumption that DynamicProxy should generate the m_timestamp property as a property and load its value like it does for the ID (m_id) and the m_value property?
Is there a special thing I need to consider when implementing my special MyTimestampType? Does the class have to implement any special interface or something like that?
Basically my class looks like that:
Code:
public class MyTimestampType : ValueTypeType
{
public MyTimestampType() : base(new SqlDateTimeType().SqlType)
{
}
public override object Get(IDataReader rs, int index)
{
DateTime t = Convert.ToDateTime(rs[index]);
return t;
}
<some code snipped here>
}
Thanks for any of your help.
Ruth
Hibernate version:1.2.0.4
Mapping documents: see above
Name and version of the database you are using: MSSSQL Server 2005