[
https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530562
]
Frank Budinsky commented on TUSCANY-1780:
-----------------------------------------
This seems to be a part of the Class.javajet template that was overlooked when
we changed to generate the new noEMF pattern.
The template needs to be changed to generate the following:
protected static final List CATEGORY_TYPE_DEFAULT_ =
(List)((AddressFactoryImpl)AddressFactory.INSTANCE).createCategoryTypeFromString("myCat");
instead of what it's currently generating:
protected static final List CATEGORY_TYPE_DEFAULT_ =
(List)((EFactory)AddressFactory.INSTANCE).createFromString(AddressPackageImpl.eINSTANCE.getCategoryType(),
"myCat");
A temporary workagound is to change it by hand after generating.
> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
> Key: TUSCANY-1780
> URL: https://issues.apache.org/jira/browse/TUSCANY-1780
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Tools
> Affects Versions: Java-SDO-1.0, Java-SDO-Next
> Environment: Windows XP, JRE 1.4.2 and JRE 1.5
> Reporter: Chris Mildebrandt
> Priority: Critical
> Attachments: Address.xsd, Address2.xsd
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are
> involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required"
> default="myCat"/>
> <simpleType name="CategoryType">
> <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ =
> ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(),
> "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]