I am starting out modifying the tutorial5 from the distrubution.... Add,
edit and delete all work great, but listall is acting funny.... The records
are there, but do not get returned. Setting RsIterator logging to DEBUG
shows the results are getting selected from the rdbms, but the returned
Collection is always empty....
Java:
try
{
manager.currentTransaction().begin();
Query query = manager.newQuery(Role.class);
Collection allRoles = (Collection)query.execute();
System.out.println("Collection Returned Is Empty: " +
allRoles.isEmpty());
java.util.Iterator iter = allRoles.iterator();
System.out.println("Currently " + allRoles.size() + " Roles");
manager.currentTransaction().commit();
}
catch (Throwable t)
{
t.printStackTrace();
}
finally
{
manager.close();
}
Output:
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> false
Collection Returned Is Empty: true
Currently 0 Roles
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]