This question is locked. New answers and comments are not allowed.
Hi!
During serialization of an ObjectContainer I get the following Exception:
Unable to cast object of type 'Telerik.OpenAccess.RT.StructFieldMarker' to type 'Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable'.
I believe this has to do with classe having persistent structs attaced to them.
Here is the Class that won't serialize
Here is the Quantity Struct:
And here is the mapping:
Please help.
Thanks
Pål
During serialization of an ObjectContainer I get the following Exception:
Unable to cast object of type 'Telerik.OpenAccess.RT.StructFieldMarker' to type 'Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable'.
I believe this has to do with classe having persistent structs attaced to them.
Here is the Class that won't serialize
[Persistent, Serializable] |
public class Order : ISerializable { |
/// <summary> |
/// The <see cref="Quantity"/> of this order |
/// </summary> |
private Quantity m_Quantity; |
(...) |
} |
Here is the Quantity Struct:
[Persistent, Serializable] |
public struct Quantity : ISerializable { |
/// <summary> |
/// The decimal value of this Quantity |
/// </summary> |
private decimal m_Value; |
/// <summary> |
/// The Unit for this Quantity |
/// </summary> |
private Unit m_Unit; |
(...) |
} |
And here is the mapping:
<class name="Order"> |
<extension key="db-inheritance" value="vertical" /> |
<extension key="db-table-name" value="Order" /> |
<field name="m_Quantity"> |
<extension key="field" value="m_Unit"> |
<extension key="db-column"> |
<extension key="db-column-name" value="Quantity.UnitID" /> |
</extension> |
</extension> |
<extension key="field" value="m_Value"> |
<extension key="db-column"> |
<extension key="db-column-name" value="Quantity.Value" /> |
</extension> |
<extension key="null-value" value="exception" /> |
</extension> |
</field> |
(...) |
</class> |
Please help.
Thanks
Pål