anthony wrote:
how many sql queries are generated?
Actually a lot:
Code:
[08:54:26,515]DEBUG SQL:226 - select rnstransac0_.id as id, rnstransac0_.business_id as business2_, rnstransac0_.cargo_control_number as cargo_co3_, rnstransac0_.transaction_number as transact4_, rnstransac0_.service_option_id as service_5_, rnstransac0_.release_office_id as release_6_, rnstransac0_.sub_location_id as sub_loca7_, rnstransac0_.container_number as containe8_ from rns_transaction rnstransac0_ left outer join rns_transaction_history histories1_ on rnstransac0_.id=histories1_.rns_transaction_id, release_code releasecod4_ where (histories1_.date=(select max(rnstransac2_.date) from rns_transaction_history rnstransac2_ where (rnstransac2_.id in(select histories3_.id from rns_transaction_history histories3_ where rnstransac0_.id=histories3_.rns_transaction_id))))and(rnstransac0_.business_id=? )and(releasecod4_.number=? and histories1_.release_code_id=releasecod4_.id) order by histories1_.date desc limit ?
[08:54:26,593]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
[08:54:26,609]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
[08:54:26,625]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
[08:54:26,625]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
[08:54:26,640]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
[08:54:26,671]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
[08:54:26,687]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
[08:54:26,703]DEBUG SQL:226 - select histories0_.rns_transaction_id as rns_tran2___, histories0_.id as id__, histories0_.id as id1_, histories0_.rns_transaction_id as rns_tran2_1_, histories0_.date as date1_, histories0_.release_code_id as release_4_1_, histories0_.edi_message as edi_mess5_1_, histories0_.delivery_instructions as delivery6_1_, releasecod1_.id as id0_, releasecod1_.name as name0_, releasecod1_.number as number0_ from rns_transaction_history histories0_ left outer join release_code releasecod1_ on histories0_.release_code_id=releasecod1_.id where histories0_.rns_transaction_id=? order by histories0_.date desc
And this just seems to get bigger as I allow more max results :/