Bussiness object serialization problem
732948Nov 9 2009 — edited Dec 28 2009Hi, I have a little problem with serialization, when I want to create xml from Business object. Example:
MyBoObject obj = new MyBoObject ();
obj.atr1 = "aaa";
obj.atr2 = "bbb";
String xml = DynamicXml.createXmlTextFor(object : obj, topLevelTag : "something");
display(xml);
-----------------------
And displayed result is:
<something>
<atr2>bbb</atr2>
</something>
---------------------
atr1 is attribute, which is inherited from db table.
atr2 is atribute, which I created (it is not inherited from db table)
Whole problem is, that it only serialize atr2 - from some reason it completely ignores atr1 and his value.
Like I can't serialize attributes, which are inherited from db table.
But when I created new attribute atr2 in my Business Object (which is not inherited from db table), everything work ok. Where's the problem? I read docs, but found nothing...
Edited by: user12189610 on Nov 9, 2009 2:42 AM
Edited by: user12189610 on Nov 9, 2009 2:46 AM