the documentation suggest that only for certain features you need the internal tables in your database:
"If those features are not needed OJB can be safely run without any internal tables."
I'm trying to adapt the simple retrieval example for my own application and don't use the DList Collection. Instead I use a List. Other features which - as far as I can see - require internal tables are not used. Nevertheless I get the error from my (Oracle) db: "Table or view not found" or - if I don't include the mappings for my internal table "DListImpl not found".
If I create the internal tables everything works fine with the same code.
Can someone give me a hint how to write my code without use of internal tables or is their no way to use OJB without this tables? Here is my code:
Implementation odmg = OJB.getInstance();
Database ojbDb = odmg.newDatabase();
//open database
try {
// open database using a jcdAlias name (e.g. "default") specified
// by a jdbc-coonection-descriptor in the repository file
// if user/passwd was not set in jdbc-connection-descriptor
// it is possible to pass these using token '#', e.g. "default#user#passwd"
ojbDb.open("default", Database.OPEN_READ_WRITE);
log.debug("ojbDb: " + ojbDb.toString());
} catch (ODMGException ex) {
log.error(ex.getMessage());
}
try {
// 1. open a transaction
Transaction tx = odmg.newTransaction();
tx.begin(); // 2. get an OQLQuery object from the ODMG facade
OQLQuery query = odmg.newOQLQuery();// 3. set the OQL select statement
query.create(
"select allMerkmalDefs from " + MerkmalDef.class.getName());
// 4. perform the query and store the result
// in a persistent Collection
List allMerkmalDefs = (List) query.execute();
tx.commit(); // 5. now iterate over the result to print each merkmalDef
java.util.Iterator iter = allMerkmalDefs.iterator();
while (iter.hasNext()) {
MerkmalDef merkmalDef = (MerkmalDef) iter.next();
log.debug(merkmalDef.getMerkmalNr());
} } catch (Throwable t) {
log.error(t.getMessage());
}Thanks in advance.
Franz
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
