|
Re: jpa.teno-Annotation => persistence-mapping-hibernate [message #663847 is a reply to message #663830] |
Wed, 06 April 2011 15:27 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Tom,
Yes seems to be a bug, can you file a bugzilla for it?
gr. Martin
On 04/06/2011 05:16 PM, Tom Schindl wrote:
> Hi,
>
> I've started converting Ecore-Annotations to influence the hbm.xml and
> DDL-Creation into the external persistence.xml to take care of
> database-engine differences.
>
> I've been successfull beside one minor thing. Using Ecore-Annotations
> I've defined a Unique-Key on an EClass like this:
>
>> <eAnnotations source="teneo.jpa">
>> <details key="value" value="@Table(uniqueConstraints = {@UniqueConstraint(columnNames={"LANGUAGECODE&q uot;,"COUNTRYCODE","VARIANT&q uot;})}) "/>
>> </eAnnotations>
>
> but I'm unable to port this over to the annotation.xml-File where I've
> tried it like this:
>
>> <p:table>
>> <p:unique-constraint>LANGUAGECODE,COUNTRYCODE,VARIANT</p:unique-constraint >
>> </p:table>
>
> But when generating this results in an CCE shown below:
>
>> INFO: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
>> java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
>> at org.eclipse.emf.teneo.annotations.pannotation.impl.UniqueCon straintImpl.eSet(UniqueConstraintImpl.java:97)
>> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1081)
>> at org.eclipse.emf.teneo.annotations.xml.XmlPersistenceContentH andler.characters(XmlPersistenceContentHandler.java:386)
>> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .characters(Unknown Source)
>> at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidato r.characters(Unknown Source)
>> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown Source)
>> at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
>> at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown Source)
>> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown Source)
>> at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at org.eclipse.emf.teneo.annotations.xml.XmlPersistenceMapper.a pplyPersistenceMapping(XmlPersistenceMapper.java:109)
>> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:157)
>> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:73)
>> at org.eclipse.emf.teneo.hibernate.HbHelper.generateMapping(HbH elper.java:204)
>> at com.bizerba.retail.model.devtool.HbmGenerateAction.generateH bmXML(HbmGenerateAction.java:82)
>> at com.bizerba.retail.model.devtool.HbmGenerateAction.createFir ebird(HbmGenerateAction.java:123)
>> at com.bizerba.retail.model.devtool.HbmGenerateAction.run(HbmGe nerateAction.java:195)
>
> Should I file a bug for this?
>
> Tom
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: jpa.teno-Annotation => persistence-mapping-hibernate [message #663848 is a reply to message #663847] |
Wed, 06 April 2011 15:46 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi Martin,
File as https://bugs.eclipse.org/bugs/show_bug.cgi?id=342038
Tom
Am 06.04.11 17:27, schrieb Martin Taal:
> Hi Tom,
> Yes seems to be a bug, can you file a bugzilla for it?
>
> gr. Martin
>
> On 04/06/2011 05:16 PM, Tom Schindl wrote:
>> Hi,
>>
>> I've started converting Ecore-Annotations to influence the hbm.xml and
>> DDL-Creation into the external persistence.xml to take care of
>> database-engine differences.
>>
>> I've been successfull beside one minor thing. Using Ecore-Annotations
>> I've defined a Unique-Key on an EClass like this:
>>
>>> <eAnnotations source="teneo.jpa">
>>> <details key="value" value="@Table(uniqueConstraints =
>>> {@UniqueConstraint(columnNames={"LANGUAGECODE&q uot;,"COUNTRYCODE","VARIANT&q uot;})}) "/>
>>>
>>> </eAnnotations>
>>
>> but I'm unable to port this over to the annotation.xml-File where I've
>> tried it like this:
>>
>>> <p:table>
>>>
>>> <p:unique-constraint>LANGUAGECODE,COUNTRYCODE,VARIANT</p:unique-constraint >
>>>
>>> </p:table>
>>
>> But when generating this results in an CCE shown below:
>>
>>> INFO: Class loader strategy set to:
>>> org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
>>> java.lang.ClassCastException: java.lang.String cannot be cast to
>>> java.util.Collection
>>> at
>>> org.eclipse.emf.teneo.annotations.pannotation.impl.UniqueCon straintImpl.eSet(UniqueConstraintImpl.java:97)
>>>
>>> at
>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1081)
>>>
>>> at
>>> org.eclipse.emf.teneo.annotations.xml.XmlPersistenceContentH andler.characters(XmlPersistenceContentHandler.java:386)
>>>
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .characters(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidato r.characters(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
>>> Source)
>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>> at
>>> org.eclipse.emf.teneo.annotations.xml.XmlPersistenceMapper.a pplyPersistenceMapping(XmlPersistenceMapper.java:109)
>>>
>>> at
>>> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:157)
>>>
>>> at
>>> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:73)
>>>
>>> at
>>> org.eclipse.emf.teneo.hibernate.HbHelper.generateMapping(HbH elper.java:204)
>>>
>>> at
>>> com.bizerba.retail.model.devtool.HbmGenerateAction.generateH bmXML(HbmGenerateAction.java:82)
>>>
>>> at
>>> com.bizerba.retail.model.devtool.HbmGenerateAction.createFir ebird(HbmGenerateAction.java:123)
>>>
>>> at
>>> com.bizerba.retail.model.devtool.HbmGenerateAction.run(HbmGe nerateAction.java:195)
>>>
>>
>> Should I file a bug for this?
>>
>> Tom
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03291 seconds