I am having a strange problem. I have a class Person, a class Candidate that extends Person and a class Address that has a many-to-one relationship with Person. I created a testcase that inserts a candidate with lastName=="Witt", with a homeAddress, and then does a query for all objects with that lastName. The first time everything seemed fine, but after repeated runs, although the object is inserted ok each time, and the query returns exactly the right number of objects, only the last object is materialized. The first objects have all fields set to NULL....? (The null fields in the last object are ok, I just never set them).

Could you look at the code and results below? I am sorry this has become a lengthy post.

Thanks in advance for any help,

-Stijn



/*
*  TestCodamo.java. Created on 2-okt-2004.
*/
package nl.bergland.codamo.test;

import java.util.Vector;
import java.util.List;
import java.util.Iterator;

import junit.framework.TestCase;

import org.odmg.*;
import org.apache.ojb.odmg.*;

import nl.bergland.codamo.job.Candidate;
import nl.bergland.codamo.Address;

/**
* @author Stijn de Witt <[EMAIL PROTECTED]>
*/
public class TestCodamo extends TestCase
{
private Implementation persistenceManager;
public void openDatabase(String alias) throws ODMGException
{
System.out.println("openDatabase: Getting ODMG persistence implementation...");
this.persistenceManager = OJB.getInstance();
System.out.println("openDatabase: Creating database...");
Database db = this.persistenceManager.newDatabase();
System.out.println("openDatabase: Database==" + db + "; Opening...");
db.open(alias, Database.OPEN_READ_WRITE);
System.out.println("openDatabase: Getting ODMG persistence implementation...");
}


public void storeCandidate(Candidate c)
{
System.out.println("storeCandidate: Starting...");
System.out.println("storeCandidate: Creating transaction...");
Transaction tx = this.persistenceManager.newTransaction();
System.out.println("storeCandidate: Created transaction tx==" + tx);
System.out.println("storeCandidate: Starting transaction tx...");
tx.begin();
System.out.println("storeCandidate: Locking candidate...");
tx.lock(c, Transaction.WRITE);
System.out.println("storeCandidate: Committing transaction...");
tx.commit();
System.out.println("storeCandidate: Committed transaction.");
System.out.println("storeCandidate: Done.");
}
public List executeOqlQuery(String oqlQuery, List parameters) throws QueryException
{
System.out.println("executeOqlQuery: Starting...");
System.out.println("executeOqlQuery: Creating transaction...");
Transaction tx = this.persistenceManager.newTransaction();
System.out.println("executeOqlQuery: Created transaction==" + tx);
System.out.println("executeOqlQuery: Starting transaction...");
tx.begin();
System.out.println("executeOqlQuery: Creating query...");
OQLQuery query = this.persistenceManager.newOQLQuery();
query.create(oqlQuery);
System.out.println("executeOqlQuery: Binding parameters...");
for (Iterator it = parameters.iterator(); it.hasNext(); )
{ Object parameter = it.next();
query.bind(parameter);
}


System.out.println("executeOqlQuery: Executing query...");
DList results = (DList) query.execute();
System.out.println("executeOqlQuery: Query returned " + results.size() + " results.");


int i=0;
for (Iterator it = results.iterator(); it.hasNext(); i++)
System.out.println("executeOqlQuery: result[" + i + "]==" + it.next());
System.out.println("executeOqlQuery: Committing transaction...");
tx.commit();
System.out.println("executeOqlQuery: Committed transaction.");
System.out.println("executeOqlQuery: Done.");
return results;
}
// THIS METHOD IS CALLED BY JUNIT
public void testCandidateSubmit() throws Exception
{
System.out.println("testCandidateSubmit: Starting...");
System.out.println("testCandidateSubmit: Creating testCandidate...");
Candidate testCandidate = new Candidate();
testCandidate.setFirstName("Stijn");
testCandidate.setMiddleName("de");
testCandidate.setLastName("Witt");
testCandidate.setHasTransportation(true);
System.out.println("testCandidateSubmit: Creating homeAddress...");
Address homeAddress = new Address();
homeAddress.setStreet("MyStreet");
homeAddress.setHouseNr("7");
homeAddress.setZipCode("MYZIP BM");
homeAddress.setCity("MyCity");
homeAddress.setCountry("NL");
homeAddress.setType("homeAddress");
System.out.println("testCandidateSubmit: Adding homeAddress to testCandidate...");
testCandidate.getAddresses().add(homeAddress);
this.openDatabase("default");
System.out.println("testCandidateSubmit: Storing testCandidate...");
this.storeCandidate(testCandidate);
System.out.println("testCandidateSubmit: Done.");
}
// THIS METHOD IS CALLED BY JUNIT
public void testQueryCandidate() throws Exception
{
System.out.println("testQueryCandidate: Starting...");
this.openDatabase("default");
String query = "select candidates " +
"from " + Candidate.class.getName() + " " +
"where lastName = $1";
Vector parameters = new Vector();
parameters.add(new String("Witt"));
System.out.println("testQueryCandidate: Preparing to execute query:\n" + query);
System.out.println("testQueryCandidate: with parameters:\n" + parameters);
List results = this.executeOqlQuery(query, parameters);
System.out.println("testQueryCandidate: Executed query.");
for (Iterator it = results.iterator(); it.hasNext(); )
System.out.println("testQueryCandidate: Found candidate " + it.next());
System.out.println("testQueryCandidate: Done.");
}
}




The void test*() methods are called by JUnit. Here is the output of the Maven 'test' command:


build:start:

java:prepare-filesystem:

java:compile:
   [echo] Compiling to C:\bit\dev\project\common\bit-codamo/target/classes

java:jar-resources:
filter-repository:
[echo] Filtering repository in C:\bit\dev\project\common\bit-codamo/src/repository
[echo] To C:\bit\dev\project\common\bit-codamo/target/classes


xdoclet:
[echo] Creating C:\bit\dev\project\common\bit-codamo/target/classes/repository_user.xml
[echo] and C:\bit\dev\project\common\bit-codamo/target/schema/bit-codamo-schema.xml...
[echo] src=C:\bit\dev\project\common\bit-codamo/src/java dst==C:\bit\dev\project\common\bit-codamo/target



test:prepare-filesystem:

test:test-resources:

test:compile:
[javac] Compiling 1 source file to C:\bit\dev\project\common\bit-codamo\target\test-classes


test:test:
[junit] Running nl.bergland.codamo.test.TestCodamo
testCandidateSubmit: Starting...
testCandidateSubmit: Creating testCandidate...
testCandidateSubmit: Creating homeAddress...
testCandidateSubmit: Adding homeAddress to testCandidate...
openDatabase: Getting ODMG persistence implementation...
openDatabase: Creating database...
openDatabase: [EMAIL PROTECTED]; Opening...
openDatabase: Getting ODMG persistence implementation...
testCandidateSubmit: Storing testCandidate...
storeCandidate: Starting...
storeCandidate: Creating transaction...
storeCandidate: Created transaction [EMAIL PROTECTED]
storeCandidate: Starting transaction tx...
storeCandidate: Locking candidate...
storeCandidate: Committing transaction...
storeCandidate: Committed transaction.
storeCandidate: Done.
testCandidateSubmit: Done.
testQueryCandidate: Starting...
openDatabase: Getting ODMG persistence implementation...
openDatabase: Creating database...
openDatabase: [EMAIL PROTECTED]; Opening...
openDatabase: Getting ODMG persistence implementation...
testQueryCandidate: Preparing to execute query:
select candidates from nl.bergland.codamo.job.Candidate where lastName = $1
testQueryCandidate: with parameters:
[Witt]
executeOqlQuery: Starting...
executeOqlQuery: Creating transaction...
executeOqlQuery: Created [EMAIL PROTECTED]
executeOqlQuery: Starting transaction...
executeOqlQuery: Creating query...
executeOqlQuery: Binding parameters...
executeOqlQuery: Executing query...
executeOqlQuery: Query returned 4 results.
executeOqlQuery: [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null


executeOqlQuery: [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

executeOqlQuery: [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null

executeOqlQuery: [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==de
lastName==Witt
firstName==Stijn
birthDate==null
nationality==null
   [EMAIL PROTECTED];
street==MyStreet;
houseNr==7;
zipCode==MYZIP BM;
city==MyCity;
state==;
country==NL;
type==homeAddress;


executeOqlQuery: Committing transaction...
executeOqlQuery: Committed transaction.
executeOqlQuery: Done.
testQueryCandidate: Executed query.
testQueryCandidate: Found candidate [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null


testQueryCandidate: Found candidate [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null


testQueryCandidate: Found candidate [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==null
lastName==null
firstName==null
birthDate==null
nationality==null


testQueryCandidate: Found candidate [EMAIL PROTECTED]
salutation==null
title==null
initials==null
middleName==de
lastName==Witt
firstName==Stijn
birthDate==null
nationality==null
[EMAIL PROTECTED];
street==MyStreet;
houseNr==7;
zipCode==MYZIP BM;
city==MyCity;
state==;
country==NL;
type==homeAddress;



testQueryCandidate: Done. [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1,718 sec [junit] Testsuite: nl.bergland.codamo.test.TestCodamo [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1,718 sec [junit] BUILD SUCCESSFUL Total time: 8 seconds Finished at: Sat Oct 02 22:31:24 CEST 2004


And, to be complete, here are my repository_database.xml and repository_user.xml:


<!--
Define here all used connections.
One defined connection should be defined as the default one,
by set default-connection="true" - this could be done at runtime too.

It is possible to set user/password at
runtime or let login different users at runtime using the same
database. Use different PBKey with same jcdAlias name but
different user/password.

Ditto it is possible to add jdbc-connection-descriptor at runtime
using the MetadataManager.
-->
   <!-- this connection was used as the default one within OJB -->
   <jdbc-connection-descriptor
          jcd-alias="default"
          default-connection="true"
          platform="MySQL"
          jdbc-level="3.0"
          driver="com.mysql.jdbc.Driver"
          protocol="jdbc"
          subprotocol="mysql"
          dbalias="//localhost:3306/codamo"
          username="root"
          password="mysqlland23"
          batch-mode="false"
       useAutoCommit="1"
       ignoreAutoCommitExceptions="false"
    >

<object-cache class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl">
<attribute attribute-name="timeout" attribute-value="900"/>
<attribute attribute-name="autoSync" attribute-value="true"/>
</object-cache>


       <connection-pool
           maxActive="21"
           validationQuery="select 1;"
           testOnBorrow="false"
           testOnReturn="false"
       />

<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
<attribute attribute-name="grabSize" attribute-value="20"/>
<attribute attribute-name="autoNaming" attribute-value="true"/>
<attribute attribute-name="globalSequenceId" attribute-value="false"/>
<attribute attribute-name="globalSequenceStart" attribute-value="10000"/>
</sequence-manager>
</jdbc-connection-descriptor>



<!-- file containing the repository descriptions for user-defined types --> <!-- Generated by the xdoclet-ojb module -->

<class-descriptor
class="nl.bergland.codamo.Address"
table="bit_Address"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="street"
column="street"
jdbc-type="VARCHAR"
length="48"
>
</field-descriptor>
<field-descriptor
name="houseNr"
column="houseNr"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<field-descriptor
name="zipCode"
column="zipCode"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<field-descriptor
name="city"
column="city"
jdbc-type="VARCHAR"
length="48"
>
</field-descriptor>
<field-descriptor
name="state"
column="state"
jdbc-type="VARCHAR"
length="32"
>
</field-descriptor>
<field-descriptor
name="country"
column="country"
jdbc-type="VARCHAR"
length="2"
>
</field-descriptor>
<field-descriptor
name="type"
column="type"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.EmailAddress"
table="bit_EmailAddress"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="email"
column="email"
jdbc-type="VARCHAR"
length="128"
>
</field-descriptor>
<field-descriptor
name="type"
column="type"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.Image"
table="bit_Image"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="fileName"
column="fileName"
jdbc-type="VARCHAR"
length="255"
>
</field-descriptor>
<field-descriptor
name="altText"
column="altText"
jdbc-type="VARCHAR"
length="255"
>
</field-descriptor>
<field-descriptor
name="width"
column="width"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="height"
column="height"
jdbc-type="INTEGER"
>
</field-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.Person"
table="bit_Person"
>
<extent-class class-ref="nl.bergland.codamo.job.Candidate"/>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="salutation"
column="salutation"
jdbc-type="VARCHAR"
length="2"
>
</field-descriptor>
<field-descriptor
name="title"
column="title"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<field-descriptor
name="initials"
column="initials"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<field-descriptor
name="middleName"
column="middleName"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<field-descriptor
name="lastName"
column="lastName"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="firstName"
column="firstName"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="birthDate"
column="birthDate"
jdbc-type="DATE"
>
</field-descriptor>
<field-descriptor
name="nationality"
column="nationality"
jdbc-type="VARCHAR"
length="2"
>
</field-descriptor>
<field-descriptor
name="lastModificationDate"
column="lastModificationDate"
jdbc-type="TIMESTAMP"
>
</field-descriptor>
<field-descriptor
name="creationDate"
column="creationDate"
jdbc-type="TIMESTAMP"
>
</field-descriptor>
<field-descriptor
name="status"
column="status"
jdbc-type="INTEGER"
>
</field-descriptor>
<collection-descriptor
name="emailAddresses"
element-class-ref="nl.bergland.codamo.EmailAddress"
indirection-table="bit_PersonEmailAddress"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<fk-pointing-to-this-class column="personId"/>
<fk-pointing-to-element-class column="emailAddressId"/>
</collection-descriptor>
<collection-descriptor
name="phoneNumbers"
element-class-ref="nl.bergland.codamo.PhoneNumber"
indirection-table="bit_PersonPhoneNumber"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<fk-pointing-to-this-class column="personId"/>
<fk-pointing-to-element-class column="numberId"/>
</collection-descriptor>
<collection-descriptor
name="addresses"
element-class-ref="nl.bergland.codamo.Address"
indirection-table="bit_PersonAddress"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<fk-pointing-to-this-class column="personId"/>
<fk-pointing-to-element-class column="addressId"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.PhoneNumber"
table="bit_PhoneNumber"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="number"
column="number"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<field-descriptor
name="type"
column="type"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.cms.Content"
table="bit_cms_Content"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="formatId"
column="formatId"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="identifier"
column="identifier"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<reference-descriptor
name="format"
class-ref="nl.bergland.codamo.cms.Format"
>
<documentation>Reference to the Format of this Content.</documentation>
<foreignkey field-ref="formatId"/>
</reference-descriptor>
<collection-descriptor
name="contentItems"
element-class-ref="nl.bergland.codamo.cms.ContentItem"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<inverse-foreignkey field-ref="contentId"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.cms.ContentItem"
table="bit_cms_ContentItem"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="contentId"
column="contentId"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="formatItemId"
column="formatItemId"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="idValue"
column="idValue"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<reference-descriptor
name="content"
class-ref="nl.bergland.codamo.cms.Content"
>
<documentation>Reference to the Content this ContentItem belongs to</documentation>
<foreignkey field-ref="contentId"/>
</reference-descriptor>
<reference-descriptor
name="formatItem"
class-ref="nl.bergland.codamo.cms.FormatItem"
>
<documentation>Reference to the FormatItem associated with this ContentItem.</documentation>
<foreignkey field-ref="formatItemId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.cms.Format"
table="bit_cms_Format"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="name"
column="name"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="description"
column="description"
jdbc-type="LONGVARCHAR"
>
</field-descriptor>
<collection-descriptor
name="templates"
element-class-ref="nl.bergland.codamo.cms.Template"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<inverse-foreignkey field-ref="formatId"/>
</collection-descriptor>
<collection-descriptor
name="formatItems"
element-class-ref="nl.bergland.codamo.cms.FormatItem"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<inverse-foreignkey field-ref="formatId"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.cms.FormatItem"
table="bit_cms_FormatItem"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="name"
column="name"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="formatId"
column="formatId"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="primitiveId"
column="primitiveId"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="required"
column="required"
jdbc-type="BIT"
>
</field-descriptor>
<reference-descriptor
name="format"
class-ref="nl.bergland.codamo.cms.Format"
>
<documentation>Reference to the Format this FormatItem belongs to</documentation>
<foreignkey field-ref="formatId"/>
</reference-descriptor>
<reference-descriptor
name="primitive"
class-ref="nl.bergland.codamo.cms.Primitive"
>
<documentation>Reference to the Primitive associated with this FormatItem.</documentation>
<foreignkey field-ref="primitiveId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.cms.Primitive"
table="bit_cms_Primitive"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="name"
column="name"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="description"
column="description"
jdbc-type="LONGVARCHAR"
>
</field-descriptor>
<field-descriptor
name="javaClass"
column="javaClass"
jdbc-type="VARCHAR"
length="255"
>
</field-descriptor>
<field-descriptor
name="javaField"
column="javaField"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="formEntryClass"
column="formEntryClass"
jdbc-type="VARCHAR"
length="255"
>
</field-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.cms.Template"
table="bit_cms_Template"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="formatId"
column="formatId"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="fileName"
column="fileName"
jdbc-type="VARCHAR"
length="255"
>
</field-descriptor>
<reference-descriptor
name="format"
class-ref="nl.bergland.codamo.cms.Format"
>
<documentation>Reference to the Format this Template belongs to</documentation>
<foreignkey field-ref="formatId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.job.Candidate"
table="bit_job_Candidate"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="married"
column="married"
jdbc-type="VARCHAR"
length="4"
>
</field-descriptor>
<field-descriptor
name="driversLicense"
column="driversLicense"
jdbc-type="VARCHAR"
length="4"
>
</field-descriptor>
<field-descriptor
name="socialSecurityNr"
column="socialSecurityNr"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<field-descriptor
name="hasTransportation"
column="hasTransportation"
jdbc-type="BIT"
>
</field-descriptor>
<field-descriptor
name="availableFrom"
column="availableFrom"
jdbc-type="DATE"
>
</field-descriptor>
<field-descriptor
name="availability"
column="availability"
jdbc-type="VARCHAR"
length="254"
>
</field-descriptor>
<reference-descriptor
name="super"
class-ref="nl.bergland.codamo.Person"
auto-retrieve="true"
auto-update="true"
auto-delete="true"
>
<foreignkey field-ref="id"/>
</reference-descriptor>
<collection-descriptor
name="educations"
element-class-ref="nl.bergland.codamo.job.Education"
indirection-table="bit_job_CandidateEducation"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<fk-pointing-to-this-class column="candidateId"/>
<fk-pointing-to-element-class column="educationId"/>
</collection-descriptor>
<collection-descriptor
name="experiences"
element-class-ref="nl.bergland.codamo.job.Experience"
indirection-table="bit_job_CandidateExperience"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<fk-pointing-to-this-class column="candidateId"/>
<fk-pointing-to-element-class column="experienceId"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.job.Education"
table="bit_job_Education"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="name"
column="name"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="institution"
column="institution"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="startDate"
column="startDate"
jdbc-type="DATE"
>
</field-descriptor>
<field-descriptor
name="stopDate"
column="stopDate"
jdbc-type="DATE"
>
</field-descriptor>
<field-descriptor
name="level"
column="level"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="diploma"
column="diploma"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="comments"
column="comments"
jdbc-type="LONGVARCHAR"
>
</field-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.job.Experience"
table="bit_job_Experience"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="companyName"
column="companyName"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="duties"
column="duties"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="startDate"
column="startDate"
jdbc-type="DATE"
>
</field-descriptor>
<field-descriptor
name="stopDate"
column="stopDate"
jdbc-type="DATE"
>
</field-descriptor>
<field-descriptor
name="comments"
column="comments"
jdbc-type="LONGVARCHAR"
>
</field-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.job.Sector"
table="bit_job_Sector"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="code"
column="code"
jdbc-type="VARCHAR"
length="16"
>
</field-descriptor>
<collection-descriptor
name="sectorNames"
element-class-ref="nl.bergland.codamo.job.SectorName"
auto-retrieve="true"
auto-update="false"
auto-delete="false"
>
<inverse-foreignkey field-ref="sectorId"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.job.SectorName"
table="bit_job_SectorName"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="sectorId"
column="sectorId"
jdbc-type="INTEGER"
>
</field-descriptor>
<field-descriptor
name="name"
column="name"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="description"
column="description"
jdbc-type="LONGVARCHAR"
>
</field-descriptor>
<field-descriptor
name="lang"
column="lang"
jdbc-type="VARCHAR"
length="2"
>
</field-descriptor>
<reference-descriptor
name="sector"
class-ref="nl.bergland.codamo.job.Sector"
auto-retrieve="false"
auto-update="false"
auto-delete="false"
>
<documentation>Reference to the Sector this SectorName belongs to</documentation>
<foreignkey field-ref="sectorId"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="nl.bergland.codamo.news.NewsItem"
table="bit_news_NewsItem"
>
<field-descriptor
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
length="11"
>
</field-descriptor>
<field-descriptor
name="postDate"
column="postDate"
jdbc-type="DATE"
>
</field-descriptor>
<field-descriptor
name="title"
column="title"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="subTitle"
column="subTitle"
jdbc-type="VARCHAR"
length="64"
>
</field-descriptor>
<field-descriptor
name="message"
column="message"
jdbc-type="LONGVARCHAR"
>
</field-descriptor>
<field-descriptor
name="postedBy"
column="postedBy"
jdbc-type="VARCHAR"
length="32"
>
</field-descriptor>
</class-descriptor>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to