[ http://issues.apache.org/jira/browse/TUSCANY-741?page=comments#action_12436624 ] Yang ZHONG commented on TUSCANY-741: ------------------------------------
As for automatic DataType conversion, SDO Java spec 2.01 page 146 marks "x" from Date to String; however page 145 says "Conversions with an x are supported through DataObject or DataHelper."; since DataHelper has supported the conversion from Date to String already, I'm not sure the spec mandates DataObject to *automatically* convert. > ClassCastException while trying to set a date property > ------------------------------------------------------ > > Key: TUSCANY-741 > URL: http://issues.apache.org/jira/browse/TUSCANY-741 > Project: Tuscany > Issue Type: Bug > Components: Java BigBank Scenario, Java SDO Implementation > Affects Versions: Java-M2 > Reporter: Luciano Resende > Fix For: Java-M2 > > > Getting exception while trying to set date property : > stockPurchase.set("purchaseDate", new Date()); > Exception in thread "main" java.lang.ClassCastException: java.util.Date > at > com.bigbank.account.impl.StockSummaryImpl.eSet(StockSummaryImpl.java:514) > at > org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:653) > at > org.apache.tuscany.sdo.impl.DataObjectImpl.set(DataObjectImpl.java:140) > at > org.apache.tuscany.sdo.util.DataObjectUtil.set(DataObjectUtil.java:726) > at > org.apache.tuscany.sdo.impl.DataObjectImpl.set(DataObjectImpl.java:223) > at > bigbank.account.services.accountdb.AccountDBInit.testStrockPurchaseThroughDAS(AccountDBInit.java:303) > at > bigbank.account.services.accountdb.AccountDBInit.main(AccountDBInit.java:461) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]