db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject Re: JIRA JDO-68
Date Wed, 03 Aug 2005 11:14:45 GMT
Hi Andy,

>>One question: JPOX does not complain if the ORM metadata for a class
>>specifies fields which do not exist in that class. Would it be an option
>>to throw a JDOFatalUserException("ORM metadata of class XXX specifies
>>column mapping for field YYY. This field does not exist in the class.")
>>in this case?
> 
> 
> Hi Michael,
> 
> Well in my tests JPOX *does* complain about situations of incorrectly named 
> fields. Here's an example
> 
> public class Simple
> {
>     String name;
> }
> 
> <jdo>
>     <package name="org.jpox.test">
>         <class name="Simple">
>             <field name="name"/>
>         </class>
>     </package>
> </jdo>
> 
> <orm>
>     <package name="org.jpox.test">
>         <class name="Simple">
>             <field name="name2"/>
>         </class>
>     </package>
> </orm>
>     
> and it gives "An exception was thrown during the operation of SchemaTool. 
> Please refer to the log for full details. The following may help : 
> org.jpox.metadata.InvalidMetaDataException: Class org.jpox.test.Simple has 
> field org.jpox.test.Simple.name2 declared in MetaData, but this field doesnt 
> exist in the class!"
The message reads as if the exception is thrown during execution of 
SchemaTool. I'm not sure if SchemaTool if executed running TCK because 
TCK assumes there is an existing schema in DB. These are JPOX parameters 
that TCK specifies in file "jdori.properties":

org.jpox.validateTables=false
org.jpox.validateConstraints=false
org.jpox.autoCreateSchema=false
org.jpox.autoCreateTables=false
org.jpox.autoCreateConstraints=false
org.jpox.autoCreateColumns=false
org.jpox.rdbms.CheckExistTablesOrViews=false

Are these adjustments right?

Regards,
Michael
-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Mime
View raw message