John
Setting auto-retrieve = "false" works for me using JBoss & mySQL *except* that then I 
don't get any dependant ojbects loaded :-(


-----Original Message-----
From: McCaffrey, John G. [mailto:[EMAIL PROTECTED]
Sent: 30 May 2003 17:45
To: 'OJB Users List'
Subject: RE: Limited collection returned


I have been having the same problem. It seems like the initial query
actually gets all the rows, but the RSIterator only gives you one at a time.
In my situation if I  have 4 rows that match the query, and I execute the
query once, I only get one row, each additional time I execute the query I
get one more row (all previous rows are also returned in the collection).
This is only happening for a referenced collection, all of my other queries
are working fine.  I have no Idea what the deal is, I really hope that
someone can help you.

-John

-----Original Message-----
From: Ken Dempster [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:38 AM
To: [EMAIL PROTECTED]
Subject: Limited collection returned


Most everything works except I only get one out of the know four row
objects from the table in my collection.  I want to get all the row
objects in the table.  My question is why am I only getting only one row
object?  I am not sure what I am doing something wrong.    
 
Here is how I have things setup.  I have set jboss 3.2 as suggested in
the deployment section of the documentation and have jboss configured it
with data source to connect to a DB2 database.  I am requesting a
collection from a client to a SessionBean that delegates to a
PersistenceBroker instance.   Basicly I am using the code in
PersistenceBrokerBean as a template for my EJB.  I do generate my own
JdbcConnectionDescriptor and pass it to the ConnectionRepository instead
of using the repository.xml to define my JdbcConnectionDescriptor.  
 
My query looks as follows:
Query query = new QueryByCriteria(Runner.class, null);

Collection list =
getPersistenceBrokerRemote().getCollectionByQuery(query);

 
My ClassDescriptor of the collection of objects I am trying to get is
defined in the repository_user.xml as follows :
 
<class-descriptor class="test.ojb.Runner" table="KENLIB.RUNNER">

<field-descriptor name="m_id" column="ID" jdbc-type="INTEGER"
primarykey="true" autoincrement="true"/>

<field-descriptor name="m_name" column="NAME" jdbc-type="VARCHAR"/>

<collection-descriptor name="m_times" element-class-ref="test.ojb.Time">

<inverse-foreignkey field-ref="m_id"/>

</collection-descriptor>

</class-descriptor>

<class-descriptor class="test.ojb.Race" table="KENLIB.RACE">

<field-descriptor name="m_id" column="ID" jdbc-type="INTEGER"
primarykey="true" autoincrement="true"/>

<field-descriptor name="m_location" column="LOCATION"
jdbc-type="VARCHAR"/>

<field-descriptor name="m_date" column="DATE" jdbc-type="DATE"/>

</class-descriptor>

<class-descriptor class="test.ojb.Time" table="KENLIB.RACE_TIME">

<field-descriptor name="m_id" column="ID" jdbc-type="INTEGER"
primarykey="true" autoincrement="true"/>

<field-descriptor name="m_runner_id" column="RUNNER_ID"
jdbc-type="INTEGER"/>

<field-descriptor name="m_race_id" column="RACE_ID"
jdbc-type="INTEGER"/>

<field-descriptor name="m_time" column="TIME" jdbc-type="VARCHAR"/>

<reference-descriptor name="m_race" class-ref="test.ojb.Race">

<foreignkey field-ref="m_race_id"/>

</reference-descriptor>

</class-descriptor>

 


Ken Dempster
Programmer Analyst
Vision Solutions, Inc.

17911 Von Karman Ave,  5th Floor
Irvine, CA 92614
UNITED STATES

Tel: +1 (949) 253-6500
Fax: +1 (949) 253-6501
Email: [EMAIL PROTECTED]
<http://www.visionsolutions.com/>
Disclaimer - 5/30/2003
The contents of this e-mail (and any attachments) are confidential, may be
privileged, and may contain copyright material of Vision Solutions, Inc. or
third parties. You may only reproduce or distribute the material if you are
expressly authorized by Vision Solutions to do so. If you are not the
intended recipient, any use, disclosure or copying of this e-mail (and any
attachments) is unauthorized. If you have received this e-mail in error,
please immediately delete it and any copies of it from your system and
notify us via e-mail at [EMAIL PROTECTED] 


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


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

Reply via email to