Duffy,

1) How do I create the core OJB tables in my database? In the documentation I am only finding the "prepare-testdb" ant target. This builds a bunch of extra tables that I do not want. Surely I can drop the extra tables... but I would like to know how to just build the core ones into my project (OJB_HL_SEQ, OJB_LOCKENTRY, OJB_NRM, OJB_DLIST, etc...).

If you are using the PersistanceBroker api in OJB (ie not ODMG or JDO) and you use RDBMS sequences for primary keys then you should not need any OJB tables in your database.


You may want columns to handle optimistic locking (eg a timestamp or integer row version).

2) Is using the OJB sequence manager the only way to get OJB to work with sequences? Several PK fields in my database are autoincrement. Will the OJB create its OWN sequences for these (i.e. if another application relies on the sequence maintained by the RDBMS itself, will it clash with the sequence OJB is maintaining?)?

You can use the dbms sequence for many dbms, look at the comments in repository.dtd or the docs.


From a repository I talked about earlier today I use

   <class-descriptor
         class="org.visres.contact.data.Country"
         table="Countries"
   >
      <field-descriptor
         name="countryId"
         column="CountryId"
         jdbc-type="INTEGER"
         primarykey="true"
         autoincrement="true"
         sequence-name="GEN_CountryId"
      />
      <field-descriptor
         name="rowVersion"
         column="RowVersion"
         jdbc-type="INTEGER"
         locking="true"
      />
      <field-descriptor
         name="name"
         column="Name"
         jdbc-type="VARCHAR"
      />
...

With Firebird.

Regards

Dave
--
David Warnock, Sundayta Ltd. http://www.sundayta.com
iDocSys for Document Management. VisibleResults for Fundraising.
Development and Hosting of Web Applications and Sites.



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



Reply via email to