hi��
i'm new to Castor so maybe its a silly question but its strange for me:
i have 4 products in DB, product 1 has two detail elements and others
has one element
but when i fetch products from db, it shows product one has two details
which is right and
product two has 3 details, product three has 4...
it seems that each fetch did not clear its detail vector
the Product and ProductDetail was taken from examples.
the is there anything wrong?
db.begin();
writer.println( "Begin transaction" );
productOql = db.getOQLQuery( "SELECT p FROM myapp.Product p
WHERE id < $1" );
productOql.bind( 5 );
results = productOql.execute();
while ( results.hasMore() ) {
product = (Product) results.next();
writer.println( product+" "+product.getDetails().size());
for(int i=0; i< product.getDetails().size(); i++ ) {
detail =
(ProductDetail)product.getDetails().elementAt(i);
writer.println(detail);
}
}
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev