Hi all.
I got an SQLException :
20 May 2011 13:22:32.356 [FATAL] [http-8080-Processor23]
[org.exolab.castor.jdo.engine.SQLStatementLoad] - A fatal error occurred
while loading com.omerin.nc.jdo.Article using SQL: SELECT
nc_article.oid, nc_article.id, nc_article.designation,
nc_article.description, nc_article.qterec, nc_article.ncfid,
nc_article.unite_cd, nc_lot.oid FROM (nc_article LEFT JOIN nc_lot ON
nc_article.oid=nc_lot.article_oid) WHERE nc_article.oid=?
java.sql.SQLException: Unexpected token NC_ARTICLE, requires SELECT in
statement [SELECT nc_article.oid, nc_article.id, nc_article.designation,
nc_article.description, nc_article.qterec, nc_article.ncfid,
nc_article.unite_cd, nc_lot.oid FROM (nc_article LEFT JOIN nc_lot ON
nc_article.oid=nc_lot.article_oid) WHERE nc_article.oid=?]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at
org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:185)
at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:278)
at
org.castor.cpa.persistence.sql.engine.CastorStatement.prepareStatement(CastorStatement.java:141)
at
org.exolab.castor.jdo.engine.SQLStatementLoad.executeStatement(SQLStatementLoad.java:327)
at org.exolab.castor.jdo.engine.SQLEngine.load(SQLEngine.java:396)
at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:564)
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:475)
at
org.castor.persist.AbstractTransactionContext.load(AbstractTransactionContext.java:553)
at
org.castor.persist.AbstractTransactionContext.load(AbstractTransactionContext.java:437)
at
org.castor.persist.resolver.ManyRelationResolver.load(ManyRelationResolver.java:254)
at org.exolab.castor.persist.ClassMolder.mold(ClassMolder.java:613)
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:548)
at
org.castor.persist.AbstractTransactionContext.load(AbstractTransactionContext.java:553)
at org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:204)
at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:646)
at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:629)
at com.omerin.nc.NcService.getSelection(NcService.java:749)
Since i deployed 1.3.2 jars.
Jdo instance is
<database name="xxxxxx" engine="hsql">
<data-source class-name="org.apache.commons.dbcp.BasicDataSource">
<param name="driverClassName" value="org.hsqldb.jdbcDriver"/>
<param name="url"
value="jdbc:hsqldb:hsql://hsqldb.omerin.com/xxxxxx"/>
<param name="validationQuery" value="select count(*) from
information_schema.system_tables"/>
<param name="username" value="sa"/>
<param name="password" value=""/>
<param name="maxActive" value="20"/>
<param name="initialSize" value="2"/>
<param name="removeAbandoned" value="true"/>
</data-source>
<mapping href="../nc/jdo/nc.xml"/>
</database>
And mapping file is attached
The statement is a basic jdo query :
db.begin();
try {
QueryResults queryResults = null;
OQLQuery query = db.getOQLQuery("select n from
com.omerin.nc.jdo.Ncf n where n.id in list " + targetCodeList);
queryResults = query.execute(Database.READONLY);
while (queryResults.hasMore()) {
arl.add((Ncf) queryResults.next());
}
queryResults.close();
query.close();
} catch (Exception e) {
e.printStackTrace();
} finally {
db.commit();
db.close();
}
Investigating the sql stuff, hsqldb doesn't like the parenthesis
inserted by castor in the from clause :
FROM (nc_article LEFT JOIN nc_lot ON nc_article.oid=nc_lot.article_oid)
Is this a bug or something that can be tuned in castor.properties ?
Thanks.
SPL
--
Sébastien Pérès-Labourdette
IS/IT architect
<?xml version="1.0" encoding="UTF-8"?>
<mapping>
<class name="com.omerin.nc.jdo.Ncf" identity="id" key-generator="IDENTITY">
<description>
ncf
</description>
<map-to table="nc_ncf" xml="ncf"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="code" type="string">
<sql name="code" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="reference" type="string">
<sql name="reference" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="recep_pds" type="double">
<sql name="recep_pds" type="double"/>
<bind-xml node="element"/>
</field>
<field name="recep_dt" type="timestamp">
<sql dirty="ignore" name="recep_dt" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="recep_comment" type="string">
<sql name="recep_comment" type="char[128]"/>
<bind-xml node="element"/>
</field>
<field name="nature" type="com.omerin.nc.jdo.Nature" required="true">
<sql name="typeid"/>
<bind-xml node="element"/>
</field>
<field name="cat1" type="string">
<sql name="cat1" type="char[4]"/>
<bind-xml node="element"/>
</field>
<field name="cat2" type="string">
<sql name="cat2" type="char[4]"/>
<bind-xml node="element"/>
</field>
<field name="acteur" type="com.omerin.nc.jdo.Acteur" required="true">
<sql name="creatorid"/>
<bind-xml node="element"/>
</field>
<field name="origine" type="com.omerin.nc.jdo.Origine" required="true">
<sql name="origineid"/>
<bind-xml node="element"/>
</field>
<field name="retour" type="com.omerin.nc.jdo.Retour">
<sql name="retourid"/>
<bind-xml node="element"/>
</field>
<field name="crdate" type="timestamp" required="true">
<sql dirty="ignore" name="crdate" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="cldate" type="timestamp">
<sql dirty="ignore" name="cldate" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="mdate" type="timestamp">
<sql dirty="ignore" name="mdate" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="clcomment" type="string">
<sql name="clcomment" type="char[128]"/>
<bind-xml node="element"/>
</field>
<field name="tid" type="string">
<sql name="tid" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="tname" type="string">
<sql name="tname" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="etat" type="com.omerin.nc.jdo.Etat" required="true">
<sql name="etatid"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[512]"/>
<bind-xml node="element"/>
</field>
<field name="cause" type="string">
<sql name="cause" type="char[1024]"/>
<bind-xml node="element"/>
</field>
<field name="postactionflag" type="int">
<sql name="postactionflag" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="postactionfile" type="string">
<sql name="postactionfile" type="char[256]"/>
<bind-xml node="element"/>
</field>
<field name="rpath" type="string">
<sql name="repo_path" type="char[128]"/>
<bind-xml node="element"/>
</field>
<field name="actionAsReference" type="com.omerin.nc.jdo.Action" collection="arraylist">
<sql many-key="ncfid"/>
</field>
<field name="articleAsReference" type="com.omerin.nc.jdo.Article" collection="arraylist">
<sql many-key="ncfid"/>
</field>
<field name="suiviAsReference" type="com.omerin.nc.jdo.Suivi" collection="arraylist">
<sql many-key="ncfid"/>
</field>
<field name="acteurNcAsReference" type="com.omerin.nc.jdo.ActeurNc" collection="arraylist">
<sql many-key="ncfid"/>
</field>
<field name="documentAsReference" type="com.omerin.nc.jdo.Document" collection="arraylist">
<sql many-key="ncfid"/>
</field>
<field name="coutAsReference" type="com.omerin.nc.jdo.Cout" collection="arraylist">
<sql many-key="ncfid"/>
</field>
<field name="avoirAsReference" type="com.omerin.nc.jdo.Avoir" collection="arraylist">
<sql many-key="ncfid"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Retour" identity="id" key-generator="IDENTITY">
<description>
retour
</description>
<map-to table="nc_retour" xml="retour"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Origine" identity="id" key-generator="IDENTITY">
<description>
origine
</description>
<map-to table="nc_origine" xml="origine"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="code" type="string" required="true">
<sql name="code" type="char[4]"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Acteur" identity="id" key-generator="IDENTITY">
<description>
acteur
</description>
<map-to table="nc_acteur" xml="acteur"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="portal_id" type="integer" required="true">
<sql name="portal_id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="nom" type="string">
<sql name="nom" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="prenom" type="string">
<sql name="prenom" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="societe" type="string">
<sql name="societe" type="char[128]"/>
<bind-xml node="element"/>
</field>
<field name="service" type="com.omerin.nc.jdo.Service">
<sql name="service_cd"/>
<bind-xml node="element"/>
</field>
<field name="fonction" type="string">
<sql name="fonction" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="actif" type="boolean">
<sql name="actif" type="bit"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Avoir" identity="id" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
avoir
</description>
<map-to table="nc_avoir" xml="avoir"/>
<field name="devise" type="com.omerin.nc.jdo.Devise" required="true">
<sql name="deviseid"/>
<bind-xml node="element"/>
</field>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="date" type="timestamp" required="true">
<sql dirty="ignore" name="date" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="montant" type="double" required="true">
<sql name="montant" type="double"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Cout" identity="id" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
cout
</description>
<map-to table="nc_cout" xml="cout"/>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="typecout" type="com.omerin.nc.jdo.Typecout" required="true">
<sql name="typeid"/>
<bind-xml node="element"/>
</field>
<field name="montant" type="double" required="true">
<sql name="montant" type="double"/>
<bind-xml node="element"/>
</field>
<field name="devise" type="com.omerin.nc.jdo.Devise" required="true">
<sql name="deviseid"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Devise" identity="id">
<description>
devise
</description>
<map-to table="nc_devise" xml="devise"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="code" type="string" required="true">
<sql name="code" type="char[3]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Etat" identity="id" key-generator="IDENTITY">
<description>
etat
</description>
<map-to table="nc_etat" xml="etat"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Lot" identity="oid" depends="com.omerin.nc.jdo.Article" key-generator="IDENTITY">
<description>
lot
</description>
<map-to table="nc_lot" xml="lot"/>
<field name="oid" type="java.lang.Long">
<sql name="oid" type="integer"/>
<bind-xml node="attribute"/>
</field>
<field name="article" type="com.omerin.nc.jdo.Article">
<sql name="article_oid"/>
<bind-xml node="element"/>
</field>
<field name="unitelot" type="com.omerin.nc.jdo.Unitelot">
<sql name="unite_cd"/>
<bind-xml node="element"/>
</field>
<field name="id" type="string" required="true">
<sql name="id" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="blid" type="string">
<sql name="blid" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="cmdid" type="string">
<sql name="cmdid" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="facid" type="string">
<sql name="facid" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="date" type="timestamp" required="true">
<sql dirty="ignore" name="date" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="qtetot" type="double">
<sql name="qtetot" type="double"/>
<bind-xml node="element"/>
</field>
<field name="qterec" type="double">
<sql name="qterec" type="double"/>
<bind-xml node="element"/>
</field>
<field name="qtenc" type="double">
<sql name="qtenc" type="double"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Nature" identity="id" key-generator="IDENTITY">
<description>
nature
</description>
<map-to table="nc_nature" xml="nature"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="code" type="string" required="true">
<sql name="code" type="char[2]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Service" identity="code">
<description>
service
</description>
<map-to table="nc_service" xml="service"/>
<field name="code" type="string" required="true">
<sql name="code" type="char[5]"/>
<bind-xml node="element"/>
</field>
<field name="nom" type="string">
<sql name="nom" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Unitelot" identity="code">
<description>
Unitelot
</description>
<map-to table="nc_unitelot" xml="unitelot"/>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="code" type="string" required="true">
<sql name="code" type="char[2]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Famille" identity="code">
<description>
famille
</description>
<map-to table="nc_famille" xml="famille"/>
<field name="code" type="string" required="true">
<sql name="code" type="char[4]"/>
<bind-xml node="element"/>
</field>
<field name="filtre" type="string" required="false">
<sql name="filtre" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Detail" identity="code">
<description>
detail
</description>
<map-to table="nc_detail" xml="detail"/>
<field name="code" type="string" required="true">
<sql name="code" type="char[4]"/>
<bind-xml node="element"/>
</field>
<field name="famille" type="com.omerin.nc.jdo.Famille" required="true">
<sql name="famillecd"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Role" identity="id" key-generator="IDENTITY">
<description>
role
</description>
<map-to table="nc_role" xml="nature"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.ActeurNc" identity="id" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
contacts
</description>
<map-to table="nc_ncacteur" xml="ncacteur"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="role" type="com.omerin.nc.jdo.Role" required="true">
<sql name="roleid"/>
<bind-xml node="element"/>
</field>
<field name="nom" type="string">
<sql name="nom" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="prenom" type="string">
<sql name="prenom" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="societe" type="string">
<sql name="societe" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="email" type="string">
<sql name="email" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="tel" type="string">
<sql name="tel" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="fax" type="string">
<sql name="fax" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="mobile" type="string">
<sql name="mobile" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Suivi" identity="id" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
suivi
</description>
<map-to table="nc_suivi" xml="suivi"/>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="acteur" type="com.omerin.nc.jdo.Acteur" required="true">
<sql name="acteurid"/>
<bind-xml node="element"/>
</field>
<field name="date" type="timestamp" required="true">
<sql dirty="ignore" name="date" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="etat1" type="com.omerin.nc.jdo.Etat" required="true">
<sql name="netatid"/>
<bind-xml node="element"/>
</field>
<field name="etat2" type="com.omerin.nc.jdo.Etat" required="true">
<sql name="petatid"/>
<bind-xml node="element"/>
</field>
<field name="label" type="string">
<sql name="label" type="char[256]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Typecout" identity="id" key-generator="IDENTITY">
<description>
typecout
</description>
<map-to table="nc_typecout" xml="typecout"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Typeaction" identity="id" key-generator="IDENTITY">
<description>
TypeAction
</description>
<map-to table="nc_typeaction" xml="typeaction"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="libelle" type="string" required="true">
<sql name="libelle" type="char[128]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Doctype" identity="id" key-generator="IDENTITY">
<description>
doctype
</description>
<map-to table="nc_doctype" xml="doctype"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Typetiers" identity="id" key-generator="IDENTITY">
<description>
typetiers
</description>
<map-to table="nc_typetiers" xml="typetiers"/>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" required="true">
<sql name="name" type="char[40]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Document" identity="oid" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
document
</description>
<map-to table="nc_document" xml="document"/>
<field name="oid" type="java.lang.Long">
<sql name="oid" type="integer"/>
<bind-xml node="attribute"/>
</field>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="doctype" type="com.omerin.nc.jdo.Doctype" required="true">
<sql name="doctypeid"/>
<bind-xml node="element"/>
</field>
<field name="id" type="string" required="true">
<sql name="id" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="date" type="timestamp" required="true">
<sql dirty="ignore" name="date" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Tiers" identity="oid" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
tiers
</description>
<map-to table="nc_tiers" xml="tiers"/>
<field name="oid" type="java.lang.Long">
<sql name="oid" type="integer"/>
<bind-xml node="attribute"/>
</field>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="id" type="string" required="true">
<sql name="id" type="char[32]"/>
<bind-xml node="element"/>
</field>
<field name="typetiers" type="com.omerin.nc.jdo.Typetiers" required="true">
<sql name="typeid"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Article" identity="oid" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
article
</description>
<map-to table="nc_article" xml="article"/>
<field name="oid" type="java.lang.Long">
<sql name="oid" type="integer"/>
<bind-xml node="attribute"/>
</field>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="id" type="string" required="true">
<sql name="id" type="char[16]"/>
<bind-xml node="element"/>
</field>
<field name="designation" type="string">
<sql name="designation" type="char[64]"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
<field name="qterec" type="double">
<sql name="qterec" type="double"/>
<bind-xml node="element"/>
</field>
<field name="unitelot" type="com.omerin.nc.jdo.Unitelot">
<sql name="unite_cd"/>
<bind-xml node="element"/>
</field>
<field name="lotAsReference" type="com.omerin.nc.jdo.Lot" collection="arraylist">
<sql many-key="article_oid"/>
</field>
</class>
<class name="com.omerin.nc.jdo.Action" identity="id" depends="com.omerin.nc.jdo.Ncf" key-generator="IDENTITY">
<description>
action
</description>
<map-to table="nc_action" xml="action"/>
<field name="ncf" type="com.omerin.nc.jdo.Ncf" required="true">
<sql name="ncfid"/>
<bind-xml node="element"/>
</field>
<field name="typeaction" type="com.omerin.nc.jdo.Typeaction" required="true">
<sql name="typeid"/>
<bind-xml node="element"/>
</field>
<field name="id" type="java.lang.Long" required="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="acteur" type="com.omerin.nc.jdo.Acteur" required="true">
<sql name="acteurid"/>
<bind-xml node="element"/>
</field>
<field name="datefin" type="timestamp">
<sql dirty="ignore" name="datefin" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="datereal" type="timestamp">
<sql dirty="ignore" name="datereal" type="timestamp"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string">
<sql name="description" type="char[128]"/>
<bind-xml node="element"/>
</field>
</class>
</mapping>---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email