I must be missing something here - these both seem so simple.
First Question:
I'm loading an object in a hierarchy polymorphically, then setting some values on the subtype. When I save the object, the field reverts to what it was before the save. Here's some example code:
BaseTypeEntity obj = BaseTypeEntity.FetchPoloymorphic(null, id, null);
if (obj is SubTypeEntity)
{
SubTypeEntity sub = obj as SubTypeEntity;
sub.SubField = 100;
sub.Save();
}
obj.Save();
When I'm in the debugger, and I call Save() on 'sub' (or on 'obj' if I comment out sub.Save()), I can watch the Save occur, and the debugger immediately shows the original value.
I've also tried Save(true) but no difference. What am I doing wrong?
Second Question:
In the designer of the BaseTypeEntity, I see a 'Field on Relation' called 'SubType' that seems to imply that I should be able to access obj.SubType to get the object cast as a SubTypeEntity, but it doesn't seem to be there. What am I missing?
-mdb