I'm using Hibernate 3.2/Hibernate EntityManager 3.2.1GA in EJB 3.0 mode with Glassfish V2b23 app server with the default Apache Derby DBMS.
When I read a "Contact" object from the database, its version number gets incremented. My Contact object has several relationships with other objects.
According to the EJB 3.0 Final Release, section 3. 4.2 Version Attributes:
"The version attribute is updated by the persistence provider runtime when the object is written to the database. All non-relationship fields and properties and all relationships owned by the entity are included in version checks."
My best guess is that something in the Contact object or in a relationship field owned by the Contact object is being updated when the Contact is read from the database. Unfortunately, I've spent about 6 hours trying to find this problem, and I cannot.
Can someone please let me know if my analysis sounds correct. If so, can someone provide some help in how to use Hibernate logging with Glassfish (which I couldn't get working last time I tried) or provide guidance as to where I can breakpoint Hibernate to find out what is being updated in my objects?
Please help...a deadline approaches...I don't like the sound of that word "dead".
ShowSQL
Hibernate: select contact0_.id as id7_, contact0_.address_id as address21_7_, contact0_.version as version7_, contact0_.password as password7_, contact0_.username as username7_, contact0_.store_id as store17_7_, contact0_.firstName as firstName7_, contact0_.lastName as lastName7_, contact0_.primaryEmail as primaryE7_7_, contact0_.secondaryEmail as secondar8_7_, contact0_.company_id as company18_7_, contact0_.middleInitial as middleIn9_7_, contact0_.salutation as salutation7_, contact0_.contactSource as contact11_7_, contact0_.contactDetail_id as contact16_7_, contact0_.contactType as contact12_7_, contact0_.registeredUser_id as registe19_7_, contact0_.customer_id as customer15_7_, contact0_.contactSourceOther as contact13_7_, contact0_.reseller2_id as reseller14_7_, contact0_.rep2_id as rep22_7_, contact0_.createdBy_id as createdBy20_7_ from Contact contact0_ where contact0_.username=?
Hibernate: select reseller0_.id as id11_25_, reseller0_.version as version11_25_, reseller0_.contact_id as contact5_11_25_, reseller0_.retailer_id as retailer4_11_25_, reseller0_.DTYPE as DTYPE11_25_, contact1_.id as id7_0_, contact1_.address_id as address21_7_0_, contact1_.version as version7_0_, contact1_.password as password7_0_, contact1_.username as username7_0_, contact1_.store_id as store17_7_0_, contact1_.firstName as firstName7_0_, contact1_.lastName as lastName7_0_, contact1_.primaryEmail as primaryE7_7_0_, contact1_.secondaryEmail as secondar8_7_0_, contact1_.company_id as company18_7_0_, contact1_.middleInitial as middleIn9_7_0_, contact1_.salutation as salutation7_0_, contact1_.contactSource as contact11_7_0_, contact1_.contactDetail_id as contact16_7_0_, contact1_.contactType as contact12_7_0_, contact1_.registeredUser_id as registe19_7_0_, contact1_.customer_id as customer15_7_0_, contact1_.contactSourceOther as contact13_7_0_, contact1_.reseller2_id as reseller14_7_0_, contact1_.rep2_id as rep22_7_0_, contact1_.createdBy_id as createdBy20_7_0_, address2_.id as id4_1_, address2_.state as state4_1_, address2_.country as country4_1_, address2_.version as version4_1_, address2_.address1 as address5_4_1_, address2_.city as city4_1_, address2_.address2 as address7_4_1_, address2_.postalCode as postalCode4_1_, store3_.id as id19_2_, store3_.address_id as address9_19_2_, store3_.version as version19_2_, store3_.manager_id as manager8_19_2_, store3_.phoneNbr_id as phoneNbr7_19_2_, store3_.website as website19_2_, store3_.retailer_id as retailer6_19_2_, store3_.storeName as storeName19_2_, store3_.emailAddr as emailAddr19_2_, address4_.id as id4_3_, address4_.state as state4_3_, address4_.country as country4_3_, address4_.version as version4_3_, address4_.address1 as address5_4_3_, address4_.city as city4_3_, address4_.address2 as address7_4_3_, address4_.postalCode as postalCode4_3_, contact5_.id as id7_4_, contact5_.address_id as address21_7_4_, contact5_.version as version7_4_, contact5_.password as password7_4_, contact5_.username as username7_4_, contact5_.store_id as store17_7_4_, contact5_.firstName as firstName7_4_, contact5_.lastName as lastName7_4_, contact5_.primaryEmail as primaryE7_7_4_, contact5_.secondaryEmail as secondar8_7_4_, contact5_.company_id as company18_7_4_, contact5_.middleInitial as middleIn9_7_4_, contact5_.salutation as salutation7_4_, contact5_.contactSource as contact11_7_4_, contact5_.contactDetail_id as contact16_7_4_, contact5_.contactType as contact12_7_4_, contact5_.registeredUser_id as registe19_7_4_, contact5_.customer_id as customer15_7_4_, contact5_.contactSourceOther as contact13_7_4_, contact5_.reseller2_id as reseller14_7_4_, contact5_.rep2_id as rep22_7_4_, contact5_.createdBy_id as createdBy20_7_4_, phonenbrs6_.Contact_id as Contact1_27_, phonenbr7_.id as phoneNbrs2_27_, phonenbr7_.id as id13_5_, phonenbr7_.version as version13_5_, phonenbr7_.extension as extension13_5_, phonenbr7_.phoneNbrType as phoneNbr4_13_5_, phonenbr7_.phoneNbrStr as phoneNbr5_13_5_, phonenbr7_.digits as digits13_5_, phonenbr7_.formattedPhoneNbr as formatte7_13_5_, phonenbr7_.countryCode as countryC8_13_5_, company8_.id as id6_6_, company8_.address_id as address8_6_6_, company8_.version as version6_6_, company8_.companyName as companyN4_6_6_, company8_.phoneNbr_id as phoneNbr10_6_6_, company8_.primaryContact_id as primaryC7_6_6_, company8_.techContact_id as techCont6_6_6_, company8_.adminContact_id as adminCon9_6_6_, company8_.website as website6_6_, company8_.DTYPE as DTYPE6_6_, address9_.id as id4_7_, address9_.state as state4_7_, address9_.country as country4_7_, address9_.version as version4_7_, address9_.address1 as address5_4_7_, address9_.city as city4_7_, address9_.address2 as address7_4_7_, address9_.postalCode as postalCode4_7_, phonenbr10_.id as id13_8_, phonenbr10_.version as version13_8_, phonenbr10_.extension as extension13_8_, phonenbr10_.phoneNbrType as phoneNbr4_13_8_, phonenbr10_.phoneNbrStr as phoneNbr5_13_8_, phonenbr10_.digits as digits13_8_, phonenbr10_.formattedPhoneNbr as formatte7_13_8_, phonenbr10_.countryCode as countryC8_13_8_, contact11_.id as id7_9_, contact11_.address_id as address21_7_9_, contact11_.version as version7_9_, contact11_.password as password7_9_, contact11_.username as username7_9_, contact11_.store_id as store17_7_9_, contact11_.firstName as firstName7_9_, contact11_.lastName as lastName7_9_, contact11_.primaryEmail as primaryE7_7_9_, contact11_.secondaryEmail as secondar8_7_9_, contact11_.company_id as company18_7_9_, contact11_.middleInitial as middleIn9_7_9_, contact11_.salutation as salutation7_9_, contact11_.contactSource as contact11_7_9_, contact11_.contactDetail_id as contact16_7_9_, contact11_.contactType as contact12_7_9_, contact11_.registeredUser_id as registe19_7_9_, contact11_.customer_id as customer15_7_9_, contact11_.contactSourceOther as contact13_7_9_, contact11_.reseller2_id as reseller14_7_9_, contact11_.rep2_id as rep22_7_9_, contact11_.createdBy_id as createdBy20_7_9_, contactdet12_.id as id8_10_, contactdet12_.version as version8_10_, contactdet12_.title as title8_10_, contactdet12_.notes as notes8_10_, contactdet12_.contactSummary as contactS5_8_10_, contactdet12_.assistant_id as assistant10_8_10_, contactdet12_.department as department8_10_, contactdet12_.referredBy_id as referredBy11_8_10_, contactdet12_.structuredNotes as structur7_8_10_, contactdet12_.interest as interest8_10_, contactdet12_.acctMgr_id as acctMgr9_8_10_, contact13_.id as id7_11_, contact13_.address_id as address21_7_11_, contact13_.version as version7_11_, contact13_.password as password7_11_, contact13_.username as username7_11_, contact13_.store_id as store17_7_11_, contact13_.firstName as firstName7_11_, contact13_.lastName as lastName7_11_, contact13_.primaryEmail as primaryE7_7_11_, contact13_.secondaryEmail as secondar8_7_11_, contact13_.company_id as company18_7_11_, contact13_.middleInitial as middleIn9_7_11_, contact13_.salutation as salutation7_11_, contact13_.contactSource as contact11_7_11_, contact13_.contactDetail_id as contact16_7_11_, contact13_.contactType as contact12_7_11_, contact13_.registeredUser_id as registe19_7_11_, contact13_.customer_id as customer15_7_11_, contact13_.contactSourceOther as contact13_7_11_, contact13_.reseller2_id as reseller14_7_11_, contact13_.rep2_id as rep22_7_11_, contact13_.createdBy_id as createdBy20_7_11_, registered14_.id as id15_12_, registered14_.version as version15_12_, registered14_.enabled as enabled15_12_, registered14_.administrator as administ4_15_12_, registered14_.defaultUserGroup_id as defaultU5_15_12_, usergroup15_.id as id20_13_, usergroup15_.version as version20_13_, usergroup15_.groupName as groupName20_13_, usergroup15_.groupDescription as groupDes4_20_13_, customer16_.id as id9_14_, customer16_.version as version9_14_, reseller17_.id as id11_15_, reseller17_.version as version11_15_, reseller17_.contact_id as contact5_11_15_, reseller17_.retailer_id as retailer4_11_15_, reseller17_.DTYPE as DTYPE11_15_, retailer18_.id as id6_16_, retailer18_.address_id as address8_6_16_, retailer18_.version as version6_16_, retailer18_.companyName as companyN4_6_16_, retailer18_.phoneNbr_id as phoneNbr10_6_16_, retailer18_.primaryContact_id as primaryC7_6_16_, retailer18_.techContact_id as techCont6_6_16_, retailer18_.adminContact_id as adminCon9_6_16_, retailer18_.website as website6_16_, contact19_.id as id7_17_, contact19_.address_id as address21_7_17_, contact19_.version as version7_17_, contact19_.password as password7_17_, contact19_.username as username7_17_, contact19_.store_id as store17_7_17_, contact19_.firstName as firstName7_17_, contact19_.lastName as lastName7_17_, contact19_.primaryEmail as primaryE7_7_17_, contact19_.secondaryEmail as secondar8_7_17_, contact19_.company_id as company18_7_17_, contact19_.middleInitial as middleIn9_7_17_, contact19_.salutation as salutation7_17_, contact19_.contactSource as contact11_7_17_, contact19_.contactDetail_id as contact16_7_17_, contact19_.contactType as contact12_7_17_, contact19_.registeredUser_id as registe19_7_17_, contact19_.customer_id as customer15_7_17_, con
tact19_.contactSourceOther as contact13_7_17_, contact19_.reseller2_id as reseller14_7_17_, contact19_.rep2_id as rep22_7_17_, contact19_.createdBy_id as createdBy20_7_17_, rep20_.id as id16_18_, rep20_.version as version16_18_, contact21_.id as id7_19_, contact21_.address_id as address21_7_19_, contact21_.version as version7_19_, contact21_.password as password7_19_, contact21_.username as username7_19_, contact21_.store_id as store17_7_19_, contact21_.firstName as firstName7_19_, contact21_.lastName as lastName7_19_, contact21_.primaryEmail as primaryE7_7_19_, contact21_.secondaryEmail as secondar8_7_19_, contact21_.company_id as company18_7_19_, contact21_.middleInitial as middleIn9_7_19_, contact21_.salutation as salutation7_19_, contact21_.contactSource as contact11_7_19_, contact21_.contactDetail_id as contact16_7_19_, contact21_.contactType as contact12_7_19_, contact21_.registeredUser_id as registe19_7_19_, contact21_.customer_id as customer15_7_19_, contact21_.contactSourceOther as contact13_7_19_, contact21_.reseller2_id as reseller14_7_19_, contact21_.rep2_id as rep22_7_19_, contact21_.createdBy_id as createdBy20_7_19_, contact22_.id as id7_20_, contact22_.address_id as address21_7_20_, contact22_.version as version7_20_, contact22_.password as password7_20_, contact22_.username as username7_20_, contact22_.store_id as store17_7_20_, contact22_.firstName as firstName7_20_, contact22_.lastName as lastName7_20_, contact22_.primaryEmail as primaryE7_7_20_, contact22_.secondaryEmail as secondar8_7_20_, contact22_.company_id as company18_7_20_, contact22_.middleInitial as middleIn9_7_20_, contact22_.salutation as salutation7_20_, contact22_.contactSource as contact11_7_20_, contact22_.contactDetail_id as contact16_7_20_, contact22_.contactType as contact12_7_20_, contact22_.registeredUser_id as registe19_7_20_, contact22_.customer_id as customer15_7_20_, contact22_.contactSourceOther as contact13_7_20_, contact22_.reseller2_id as reseller14_7_20_, contact22_.rep2_id as rep22_7_20_, contact22_.createdBy_id as createdBy20_7_20_, contact23_.id as id7_21_, contact23_.address_id as address21_7_21_, contact23_.version as version7_21_, contact23_.password as password7_21_, contact23_.username as username7_21_, contact23_.store_id as store17_7_21_, contact23_.firstName as firstName7_21_, contact23_.lastName as lastName7_21_, contact23_.primaryEmail as primaryE7_7_21_, contact23_.secondaryEmail as secondar8_7_21_, contact23_.company_id as company18_7_21_, contact23_.middleInitial as middleIn9_7_21_, contact23_.salutation as salutation7_21_, contact23_.contactSource as contact11_7_21_, contact23_.contactDetail_id as contact16_7_21_, contact23_.contactType as contact12_7_21_, contact23_.registeredUser_id as registe19_7_21_, contact23_.customer_id as customer15_7_21_, contact23_.contactSourceOther as contact13_7_21_, contact23_.reseller2_id as reseller14_7_21_, contact23_.rep2_id as rep22_7_21_, contact23_.createdBy_id as createdBy20_7_21_, contact24_.id as id7_22_, contact24_.address_id as address21_7_22_, contact24_.version as version7_22_, contact24_.password as password7_22_, contact24_.username as username7_22_, contact24_.store_id as store17_7_22_, contact24_.firstName as firstName7_22_, contact24_.lastName as lastName7_22_, contact24_.primaryEmail as primaryE7_7_22_, contact24_.secondaryEmail as secondar8_7_22_, contact24_.company_id as company18_7_22_, contact24_.middleInitial as middleIn9_7_22_, contact24_.salutation as salutation7_22_, contact24_.contactSource as contact11_7_22_, contact24_.contactDetail_id as contact16_7_22_, contact24_.contactType as contact12_7_22_, contact24_.registeredUser_id as registe19_7_22_, contact24_.customer_id as customer15_7_22_, contact24_.contactSourceOther as contact13_7_22_, contact24_.reseller2_id as reseller14_7_22_, contact24_.rep2_id as rep22_7_22_, contact24_.createdBy_id as createdBy20_7_22_, phonenbr25_.id as id13_23_, phonenbr25_.version as version13_23_, phonenbr25_.extension as extension13_23_, phonenbr25_.phoneNbrType as phoneNbr4_13_23_, phonenbr25_.phoneNbrStr as phoneNbr5_13_23_, phonenbr25_.digits as digits13_23_, phonenbr25_.formattedPhoneNbr as formatte7_13_23_, phonenbr25_.countryCode as countryC8_13_23_, retailer26_.id as id6_24_, retailer26_.address_id as address8_6_24_, retailer26_.version as version6_24_, retailer26_.companyName as companyN4_6_24_, retailer26_.phoneNbr_id as phoneNbr10_6_24_, retailer26_.primaryContact_id as primaryC7_6_24_, retailer26_.techContact_id as techCont6_6_24_, retailer26_.adminContact_id as adminCon9_6_24_, retailer26_.website as website6_24_ from Reseller reseller0_ left outer join Contact contact1_ on reseller0_.contact_id=contact1_.id left outer join Address address2_ on contact1_.address_id=address2_.id left outer join Store store3_ on contact1_.store_id=store3_.id left outer join Address address4_ on store3_.address_id=address4_.id left outer join Contact contact5_ on store3_.manager_id=contact5_.id left outer join Contact_PhoneNbr phonenbrs6_ on contact5_.id=phonenbrs6_.Contact_id left outer join PhoneNbr phonenbr7_ on phonenbrs6_.phoneNbrs_id=phonenbr7_.id left outer join Company company8_ on contact5_.company_id=company8_.id left outer join Address address9_ on company8_.address_id=address9_.id left outer join PhoneNbr phonenbr10_ on company8_.phoneNbr_id=phonenbr10_.id left outer join Contact contact11_ on company8_.primaryContact_id=contact11_.id left outer join ContactDetail contactdet12_ on contact11_.contactDetail_id=contactdet12_.id left outer join Contact contact13_ on contactdet12_.assistant_id=contact13_.id left outer join RegisteredUser registered14_ on contact13_.registeredUser_id=registered14_.id left outer join UserGroup usergroup15_ on registered14_.defaultUserGroup_id=usergroup15_.id left outer join Customer customer16_ on contact13_.customer_id=customer16_.id left outer join Reseller reseller17_ on contact13_.reseller2_id=reseller17_.id left outer join Company retailer18_ on reseller17_.retailer_id=retailer18_.id left outer join Contact contact19_ on retailer18_.techContact_id=contact19_.id left outer join Rep rep20_ on contact19_.rep2_id=rep20_.id left outer join Contact contact21_ on contact19_.createdBy_id=contact21_.id left outer join Contact contact22_ on retailer18_.adminContact_id=contact22_.id left outer join Contact contact23_ on contactdet12_.referredBy_id=contact23_.id left outer join Contact contact24_ on contactdet12_.acctMgr_id=contact24_.id left outer join PhoneNbr phonenbr25_ on store3_.phoneNbr_id=phonenbr25_.id left outer join Company retailer26_ on store3_.retailer_id=retailer26_.id where reseller0_.id=?
Hibernate: select retailer0_.id as id6_25_, retailer0_.address_id as address8_6_25_, retailer0_.version as version6_25_, retailer0_.companyName as companyN4_6_25_, retailer0_.phoneNbr_id as phoneNbr10_6_25_, retailer0_.primaryContact_id as primaryC7_6_25_, retailer0_.techContact_id as techCont6_6_25_, retailer0_.adminContact_id as adminCon9_6_25_, retailer0_.website as website6_25_, address1_.id as id4_0_, address1_.state as state4_0_, address1_.country as country4_0_, address1_.version as version4_0_, address1_.address1 as address5_4_0_, address1_.city as city4_0_, address1_.address2 as address7_4_0_, address1_.postalCode as postalCode4_0_, phonenbr2_.id as id13_1_, phonenbr2_.version as version13_1_, phonenbr2_.extension as extension13_1_, phonenbr2_.phoneNbrType as phoneNbr4_13_1_, phonenbr2_.phoneNbrStr as phoneNbr5_13_1_, phonenbr2_.digits as digits13_1_, phonenbr2_.formattedPhoneNbr as formatte7_13_1_, phonenbr2_.countryCode as countryC8_13_1_, contact3_.id as id7_2_, contact3_.address_id as address21_7_2_, contact3_.version as version7_2_, contact3_.password as password7_2_, contact3_.username as username7_2_, contact3_.store_id as store17_7_2_, contact3_.firstName as firstName7_2_, contact3_.lastName as lastName7_2_, contact3_.primaryEmail as primaryE7_7_2_, contact3_.secondaryEmail as secondar8_7_2_, contact3_.company_id as company18_7_2_, contact3_.middleInitial as middleIn9_7_2_, contact3_.salutation as salutation7_2_, contact3_.contactSource as contact11_7_2_, contact3_.contactDetail_id as contact16_7_2_, contact3_.contactType as contact12_7_2_, contact3_.registeredUser_id as registe19_7_2_, contact3_.customer_id as customer15_7_2_, contact3_.contactSourceOther as contact13_7_2_, contact3_.reseller2_id as reseller14_7_2_, contact3_.rep2_id as rep22_7_2_, contact3_.createdBy_id as createdBy20_7_2_, address4_.id as id4_3_, address4_.state as state4_3_, address4_.country as country4_3_, address4_.version as version4_3_, address4_.address1 as address5_4_3_, address4_.city as city4_3_, address4_.address2 as address7_4_3_, address4_.postalCode as postalCode4_3_, store5_.id as id19_4_, store5_.address_id as address9_19_4_, store5_.version as version19_4_, store5_.manager_id as manager8_19_4_, store5_.phoneNbr_id as phoneNbr7_19_4_, store5_.website as website19_4_, store5_.retailer_id as retailer6_19_4_, store5_.storeName as storeName19_4_, store5_.emailAddr as emailAddr19_4_, address6_.id as id4_5_, address6_.state as state4_5_, address6_.country as country4_5_, address6_.version as version4_5_, address6_.address1 as address5_4_5_, address6_.city as city4_5_, address6_.address2 as address7_4_5_, address6_.postalCode as postalCode4_5_, contact7_.id as id7_6_, contact7_.address_id as address21_7_6_, contact7_.version as version7_6_, contact7_.password as password7_6_, contact7_.username as username7_6_, contact7_.store_id as store17_7_6_, contact7_.firstName as firstName7_6_, contact7_.lastName as lastName7_6_, contact7_.primaryEmail as primaryE7_7_6_, contact7_.secondaryEmail as secondar8_7_6_, contact7_.company_id as company18_7_6_, contact7_.middleInitial as middleIn9_7_6_, contact7_.salutation as salutation7_6_, contact7_.contactSource as contact11_7_6_, contact7_.contactDetail_id as contact16_7_6_, contact7_.contactType as contact12_7_6_, contact7_.registeredUser_id as registe19_7_6_, contact7_.customer_id as customer15_7_6_, contact7_.contactSourceOther as contact13_7_6_, contact7_.reseller2_id as reseller14_7_6_, contact7_.rep2_id as rep22_7_6_, contact7_.createdBy_id as createdBy20_7_6_, phonenbrs8_.Contact_id as Contact1_27_, phonenbr9_.id as phoneNbrs2_27_, phonenbr9_.id as id13_7_, phonenbr9_.version as version13_7_, phonenbr9_.extension as extension13_7_, phonenbr9_.phoneNbrType as phoneNbr4_13_7_, phonenbr9_.phoneNbrStr as phoneNbr5_13_7_, phonenbr9_.digits as digits13_7_, phonenbr9_.formattedPhoneNbr as formatte7_13_7_, phonenbr9_.countryCode as countryC8_13_7_, company10_.id as id6_8_, company10_.address_id as address8_6_8_, company10_.version as version6_8_, company10_.companyName as companyN4_6_8_, company10_.phoneNbr_id as phoneNbr10_6_8_, company10_.primaryContact_id as primaryC7_6_8_, company10_.techContact_id as techCont6_6_8_, company10_.adminContact_id as adminCon9_6_8_, company10_.website as website6_8_, company10_.DTYPE as DTYPE6_8_, contact11_.id as id7_9_, contact11_.address_id as address21_7_9_, contact11_.version as version7_9_, contact11_.password as password7_9_, contact11_.username as username7_9_, contact11_.store_id as store17_7_9_, contact11_.firstName as firstName7_9_, contact11_.lastName as lastName7_9_, contact11_.primaryEmail as primaryE7_7_9_, contact11_.secondaryEmail as secondar8_7_9_, contact11_.company_id as company18_7_9_, contact11_.middleInitial as middleIn9_7_9_, contact11_.salutation as salutation7_9_, contact11_.contactSource as contact11_7_9_, contact11_.contactDetail_id as contact16_7_9_, contact11_.contactType as contact12_7_9_, contact11_.registeredUser_id as registe19_7_9_, contact11_.customer_id as customer15_7_9_, contact11_.contactSourceOther as contact13_7_9_, contact11_.reseller2_id as reseller14_7_9_, contact11_.rep2_id as rep22_7_9_, contact11_.createdBy_id as createdBy20_7_9_, contactdet12_.id as id8_10_, contactdet12_.version as version8_10_, contactdet12_.title as title8_10_, contactdet12_.notes as notes8_10_, contactdet12_.contactSummary as contactS5_8_10_, contactdet12_.assistant_id as assistant10_8_10_, contactdet12_.department as department8_10_, contactdet12_.referredBy_id as referredBy11_8_10_, contactdet12_.structuredNotes as structur7_8_10_, contactdet12_.interest as interest8_10_, contactdet12_.acctMgr_id as acctMgr9_8_10_, contact13_.id as id7_11_, contact13_.address_id as address21_7_11_, contact13_.version as version7_11_, contact13_.password as password7_11_, contact13_.username as username7_11_, contact13_.store_id as store17_7_11_, contact13_.firstName as firstName7_11_, contact13_.lastName as lastName7_11_, contact13_.primaryEmail as primaryE7_7_11_, contact13_.secondaryEmail as secondar8_7_11_, contact13_.company_id as company18_7_11_, contact13_.middleInitial as middleIn9_7_11_, contact13_.salutation as salutation7_11_, contact13_.contactSource as contact11_7_11_, contact13_.contactDetail_id as contact16_7_11_, contact13_.contactType as contact12_7_11_, contact13_.registeredUser_id as registe19_7_11_, contact13_.customer_id as customer15_7_11_, contact13_.contactSourceOther as contact13_7_11_, contact13_.reseller2_id as reseller14_7_11_, contact13_.rep2_id as rep22_7_11_, contact13_.createdBy_id as createdBy20_7_11_, registered14_.id as id15_12_, registered14_.version as version15_12_, registered14_.enabled as enabled15_12_, registered14_.administrator as administ4_15_12_, registered14_.defaultUserGroup_id as defaultU5_15_12_, usergroup15_.id as id20_13_, usergroup15_.version as version20_13_, usergroup15_.groupName as groupName20_13_, usergroup15_.groupDescription as groupDes4_20_13_, customer16_.id as id9_14_, customer16_.version as version9_14_, reseller17_.id as id11_15_, reseller17_.version as version11_15_, reseller17_.contact_id as contact5_11_15_, reseller17_.retailer_id as retailer4_11_15_, reseller17_.DTYPE as DTYPE11_15_, contact18_.id as id7_16_, contact18_.address_id as address21_7_16_, contact18_.version as version7_16_, contact18_.password as password7_16_, contact18_.username as username7_16_, contact18_.store_id as store17_7_16_, contact18_.firstName as firstName7_16_, contact18_.lastName as lastName7_16_, contact18_.primaryEmail as primaryE7_7_16_, contact18_.secondaryEmail as secondar8_7_16_, contact18_.company_id as company18_7_16_, contact18_.middleInitial as middleIn9_7_16_, contact18_.salutation as salutation7_16_, contact18_.contactSource as contact11_7_16_, contact18_.contactDetail_id as contact16_7_16_, contact18_.contactType as contact12_7_16_, contact18_.registeredUser_id as registe19_7_16_, contact18_.customer_id as customer15_7_16_, contact18_.contactSourceOther as contact13_7_16_, contact18_.reseller2_id as reseller14_7_16_, contact18_.rep2_id as rep22_7_16_, contact18_.createdBy_id as createdBy20_7_16_, rep19_.id as id16
_17_, rep19_.version as version16_17_, contact20_.id as id7_18_, contact20_.address_id as address21_7_18_, contact20_.version as version7_18_, contact20_.password as password7_18_, contact20_.username as username7_18_, contact20_.store_id as store17_7_18_, contact20_.firstName as firstName7_18_, contact20_.lastName as lastName7_18_, contact20_.primaryEmail as primaryE7_7_18_, contact20_.secondaryEmail as secondar8_7_18_, contact20_.company_id as company18_7_18_, contact20_.middleInitial as middleIn9_7_18_, contact20_.salutation as salutation7_18_, contact20_.contactSource as contact11_7_18_, contact20_.contactDetail_id as contact16_7_18_, contact20_.contactType as contact12_7_18_, contact20_.registeredUser_id as registe19_7_18_, contact20_.customer_id as customer15_7_18_, contact20_.contactSourceOther as contact13_7_18_, contact20_.reseller2_id as reseller14_7_18_, contact20_.rep2_id as rep22_7_18_, contact20_.createdBy_id as createdBy20_7_18_, retailer21_.id as id6_19_, retailer21_.address_id as address8_6_19_, retailer21_.version as version6_19_, retailer21_.companyName as companyN4_6_19_, retailer21_.phoneNbr_id as phoneNbr10_6_19_, retailer21_.primaryContact_id as primaryC7_6_19_, retailer21_.techContact_id as techCont6_6_19_, retailer21_.adminContact_id as adminCon9_6_19_, retailer21_.website as website6_19_, contact22_.id as id7_20_, contact22_.address_id as address21_7_20_, contact22_.version as version7_20_, contact22_.password as password7_20_, contact22_.username as username7_20_, contact22_.store_id as store17_7_20_, contact22_.firstName as firstName7_20_, contact22_.lastName as lastName7_20_, contact22_.primaryEmail as primaryE7_7_20_, contact22_.secondaryEmail as secondar8_7_20_, contact22_.company_id as company18_7_20_, contact22_.middleInitial as middleIn9_7_20_, contact22_.salutation as salutation7_20_, contact22_.contactSource as contact11_7_20_, contact22_.contactDetail_id as contact16_7_20_, contact22_.contactType as contact12_7_20_, contact22_.registeredUser_id as registe19_7_20_, contact22_.customer_id as customer15_7_20_, contact22_.contactSourceOther as contact13_7_20_, contact22_.reseller2_id as reseller14_7_20_, contact22_.rep2_id as rep22_7_20_, contact22_.createdBy_id as createdBy20_7_20_, contact23_.id as id7_21_, contact23_.address_id as address21_7_21_, contact23_.version as version7_21_, contact23_.password as password7_21_, contact23_.username as username7_21_, contact23_.store_id as store17_7_21_, contact23_.firstName as firstName7_21_, contact23_.lastName as lastName7_21_, contact23_.primaryEmail as primaryE7_7_21_, contact23_.secondaryEmail as secondar8_7_21_, contact23_.company_id as company18_7_21_, contact23_.middleInitial as middleIn9_7_21_, contact23_.salutation as salutation7_21_, contact23_.contactSource as contact11_7_21_, contact23_.contactDetail_id as contact16_7_21_, contact23_.contactType as contact12_7_21_, contact23_.registeredUser_id as registe19_7_21_, contact23_.customer_id as customer15_7_21_, contact23_.contactSourceOther as contact13_7_21_, contact23_.reseller2_id as reseller14_7_21_, contact23_.rep2_id as rep22_7_21_, contact23_.createdBy_id as createdBy20_7_21_, contact24_.id as id7_22_, contact24_.address_id as address21_7_22_, contact24_.version as version7_22_, contact24_.password as password7_22_, contact24_.username as username7_22_, contact24_.store_id as store17_7_22_, contact24_.firstName as firstName7_22_, contact24_.lastName as lastName7_22_, contact24_.primaryEmail as primaryE7_7_22_, contact24_.secondaryEmail as secondar8_7_22_, contact24_.company_id as company18_7_22_, contact24_.middleInitial as middleIn9_7_22_, contact24_.salutation as salutation7_22_, contact24_.contactSource as contact11_7_22_, contact24_.contactDetail_id as contact16_7_22_, contact24_.contactType as contact12_7_22_, contact24_.registeredUser_id as registe19_7_22_, contact24_.customer_id as customer15_7_22_, contact24_.contactSourceOther as contact13_7_22_, contact24_.reseller2_id as reseller14_7_22_, contact24_.rep2_id as rep22_7_22_, contact24_.createdBy_id as createdBy20_7_22_, phonenbr25_.id as id13_23_, phonenbr25_.version as version13_23_, phonenbr25_.extension as extension13_23_, phonenbr25_.phoneNbrType as phoneNbr4_13_23_, phonenbr25_.phoneNbrStr as phoneNbr5_13_23_, phonenbr25_.digits as digits13_23_, phonenbr25_.formattedPhoneNbr as formatte7_13_23_, phonenbr25_.countryCode as countryC8_13_23_, retailer26_.id as id6_24_, retailer26_.address_id as address8_6_24_, retailer26_.version as version6_24_, retailer26_.companyName as companyN4_6_24_, retailer26_.phoneNbr_id as phoneNbr10_6_24_, retailer26_.primaryContact_id as primaryC7_6_24_, retailer26_.techContact_id as techCont6_6_24_, retailer26_.adminContact_id as adminCon9_6_24_, retailer26_.website as website6_24_ from Company retailer0_ left outer join Address address1_ on retailer0_.address_id=address1_.id left outer join PhoneNbr phonenbr2_ on retailer0_.phoneNbr_id=phonenbr2_.id left outer join Contact contact3_ on retailer0_.primaryContact_id=contact3_.id left outer join Address address4_ on contact3_.address_id=address4_.id left outer join Store store5_ on contact3_.store_id=store5_.id left outer join Address address6_ on store5_.address_id=address6_.id left outer join Contact contact7_ on store5_.manager_id=contact7_.id left outer join Contact_PhoneNbr phonenbrs8_ on contact7_.id=phonenbrs8_.Contact_id left outer join PhoneNbr phonenbr9_ on phonenbrs8_.phoneNbrs_id=phonenbr9_.id left outer join Company company10_ on contact7_.company_id=company10_.id left outer join Contact contact11_ on company10_.techContact_id=contact11_.id left outer join ContactDetail contactdet12_ on contact11_.contactDetail_id=contactdet12_.id left outer join Contact contact13_ on contactdet12_.assistant_id=contact13_.id left outer join RegisteredUser registered14_ on contact13_.registeredUser_id=registered14_.id left outer join UserGroup usergroup15_ on registered14_.defaultUserGroup_id=usergroup15_.id left outer join Customer customer16_ on contact13_.customer_id=customer16_.id left outer join Reseller reseller17_ on contact13_.reseller2_id=reseller17_.id left outer join Contact contact18_ on reseller17_.contact_id=contact18_.id left outer join Rep rep19_ on contact18_.rep2_id=rep19_.id left outer join Contact contact20_ on contact18_.createdBy_id=contact20_.id left outer join Company retailer21_ on reseller17_.retailer_id=retailer21_.id left outer join Contact contact22_ on retailer21_.adminContact_id=contact22_.id left outer join Contact contact23_ on contactdet12_.referredBy_id=contact23_.id left outer join Contact contact24_ on contactdet12_.acctMgr_id=contact24_.id left outer join PhoneNbr phonenbr25_ on store5_.phoneNbr_id=phonenbr25_.id left outer join Company retailer26_ on store5_.retailer_id=retailer26_.id where retailer0_.id=? and retailer0_.DTYPE='Retailer'
Hibernate: select retailerre0_.id as id11_25_, retailerre0_.version as version11_25_, retailerre0_.retailer_id as retailer4_11_25_, retailer1_.id as id6_0_, retailer1_.address_id as address8_6_0_, retailer1_.version as version6_0_, retailer1_.companyName as companyN4_6_0_, retailer1_.phoneNbr_id as phoneNbr10_6_0_, retailer1_.primaryContact_id as primaryC7_6_0_, retailer1_.techContact_id as techCont6_6_0_, retailer1_.adminContact_id as adminCon9_6_0_, retailer1_.website as website6_0_, address2_.id as id4_1_, address2_.state as state4_1_, address2_.country as country4_1_, address2_.version as version4_1_, address2_.address1 as address5_4_1_, address2_.city as city4_1_, address2_.address2 as address7_4_1_, address2_.postalCode as postalCode4_1_, phonenbr3_.id as id13_2_, phonenbr3_.version as version13_2_, phonenbr3_.extension as extension13_2_, phonenbr3_.phoneNbrType as phoneNbr4_13_2_, phonenbr3_.phoneNbrStr as phoneNbr5_13_2_, phonenbr3_.digits as digits13_2_, phonenbr3_.formattedPhoneNbr as formatte7_13_2_, phonenbr3_.countryCode as countryC8_13_2_, contact4_.id as id7_3_, contact4_.address_id as address21_7_3_, contact4_.version as version7_3_, contact4_.password as password7_3_, contact4_.username as username7_3_, contact4_.store_id as store17_7_3_, contact4_.firstName as firstName7_3_, contact4_.lastName as lastName7_3_, contact4_.primaryEmail as primaryE7_7_3_, contact4_.secondaryEmail as secondar8_7_3_, contact4_.company_id as company18_7_3_, contact4_.middleInitial as middleIn9_7_3_, contact4_.salutation as salutation7_3_, contact4_.contactSource as contact11_7_3_, contact4_.contactDetail_id as contact16_7_3_, contact4_.contactType as contact12_7_3_, contact4_.registeredUser_id as registe19_7_3_, contact4_.customer_id as customer15_7_3_, contact4_.contactSourceOther as contact13_7_3_, contact4_.reseller2_id as reseller14_7_3_, contact4_.rep2_id as rep22_7_3_, contact4_.createdBy_id as createdBy20_7_3_, address5_.id as id4_4_, address5_.state as state4_4_, address5_.country as country4_4_, address5_.version as version4_4_, address5_.address1 as address5_4_4_, address5_.city as city4_4_, address5_.address2 as address7_4_4_, address5_.postalCode as postalCode4_4_, store6_.id as id19_5_, store6_.address_id as address9_19_5_, store6_.version as version19_5_, store6_.manager_id as manager8_19_5_, store6_.phoneNbr_id as phoneNbr7_19_5_, store6_.website as website19_5_, store6_.retailer_id as retailer6_19_5_, store6_.storeName as storeName19_5_, store6_.emailAddr as emailAddr19_5_, address7_.id as id4_6_, address7_.state as state4_6_, address7_.country as country4_6_, address7_.version as version4_6_, address7_.address1 as address5_4_6_, address7_.city as city4_6_, address7_.address2 as address7_4_6_, address7_.postalCode as postalCode4_6_, contact8_.id as id7_7_, contact8_.address_id as address21_7_7_, contact8_.version as version7_7_, contact8_.password as password7_7_, contact8_.username as username7_7_, contact8_.store_id as store17_7_7_, contact8_.firstName as firstName7_7_, contact8_.lastName as lastName7_7_, contact8_.primaryEmail as primaryE7_7_7_, contact8_.secondaryEmail as secondar8_7_7_, contact8_.company_id as company18_7_7_, contact8_.middleInitial as middleIn9_7_7_, contact8_.salutation as salutation7_7_, contact8_.contactSource as contact11_7_7_, contact8_.contactDetail_id as contact16_7_7_, contact8_.contactType as contact12_7_7_, contact8_.registeredUser_id as registe19_7_7_, contact8_.customer_id as customer15_7_7_, contact8_.contactSourceOther as contact13_7_7_, contact8_.reseller2_id as reseller14_7_7_, contact8_.rep2_id as rep22_7_7_, contact8_.createdBy_id as createdBy20_7_7_, phonenbrs9_.Contact_id as Contact1_27_, phonenbr10_.id as phoneNbrs2_27_, phonenbr10_.id as id13_8_, phonenbr10_.version as version13_8_, phonenbr10_.extension as extension13_8_, phonenbr10_.phoneNbrType as phoneNbr4_13_8_, phonenbr10_.phoneNbrStr as phoneNbr5_13_8_, phonenbr10_.digits as digits13_8_, phonenbr10_.formattedPhoneNbr as formatte7_13_8_, phonenbr10_.countryCode as countryC8_13_8_, company11_.id as id6_9_, company11_.address_id as address8_6_9_, company11_.version as version6_9_, company11_.companyName as companyN4_6_9_, company11_.phoneNbr_id as phoneNbr10_6_9_, company11_.primaryContact_id as primaryC7_6_9_, company11_.techContact_id as techCont6_6_9_, company11_.adminContact_id as adminCon9_6_9_, company11_.website as website6_9_, company11_.DTYPE as DTYPE6_9_, contact12_.id as id7_10_, contact12_.address_id as address21_7_10_, contact12_.version as version7_10_, contact12_.password as password7_10_, contact12_.username as username7_10_, contact12_.store_id as store17_7_10_, contact12_.firstName as firstName7_10_, contact12_.lastName as lastName7_10_, contact12_.primaryEmail as primaryE7_7_10_, contact12_.secondaryEmail as secondar8_7_10_, contact12_.company_id as company18_7_10_, contact12_.middleInitial as middleIn9_7_10_, contact12_.salutation as salutation7_10_, contact12_.contactSource as contact11_7_10_, contact12_.contactDetail_id as contact16_7_10_, contact12_.contactType as contact12_7_10_, contact12_.registeredUser_id as registe19_7_10_, contact12_.customer_id as customer15_7_10_, contact12_.contactSourceOther as contact13_7_10_, contact12_.reseller2_id as reseller14_7_10_, contact12_.rep2_id as rep22_7_10_, contact12_.createdBy_id as createdBy20_7_10_, contactdet13_.id as id8_11_, contactdet13_.version as version8_11_, contactdet13_.title as title8_11_, contactdet13_.notes as notes8_11_, contactdet13_.contactSummary as contactS5_8_11_, contactdet13_.assistant_id as assistant10_8_11_, contactdet13_.department as department8_11_, contactdet13_.referredBy_id as referredBy11_8_11_, contactdet13_.structuredNotes as structur7_8_11_, contactdet13_.interest as interest8_11_, contactdet13_.acctMgr_id as acctMgr9_8_11_, contact14_.id as id7_12_, contact14_.address_id as address21_7_12_, contact14_.version as version7_12_, contact14_.password as password7_12_, contact14_.username as username7_12_, contact14_.store_id as store17_7_12_, contact14_.firstName as firstName7_12_, contact14_.lastName as lastName7_12_, contact14_.primaryEmail as primaryE7_7_12_, contact14_.secondaryEmail as secondar8_7_12_, contact14_.company_id as company18_7_12_, contact14_.middleInitial as middleIn9_7_12_, contact14_.salutation as salutation7_12_, contact14_.contactSource as contact11_7_12_, contact14_.contactDetail_id as contact16_7_12_, contact14_.contactType as contact12_7_12_, contact14_.registeredUser_id as registe19_7_12_, contact14_.customer_id as customer15_7_12_, contact14_.contactSourceOther as contact13_7_12_, contact14_.reseller2_id as reseller14_7_12_, contact14_.rep2_id as rep22_7_12_, contact14_.createdBy_id as createdBy20_7_12_, registered15_.id as id15_13_, registered15_.version as version15_13_, registered15_.enabled as enabled15_13_, registered15_.administrator as administ4_15_13_, registered15_.defaultUserGroup_id as defaultU5_15_13_, usergroup16_.id as id20_14_, usergroup16_.version as version20_14_, usergroup16_.groupName as groupName20_14_, usergroup16_.groupDescription as groupDes4_20_14_, customer17_.id as id9_15_, customer17_.version as version9_15_, reseller18_.id as id11_16_, reseller18_.version as version11_16_, reseller18_.contact_id as contact5_11_16_, reseller18_.retailer_id as retailer4_11_16_, reseller18_.DTYPE as DTYPE11_16_, contact19_.id as id7_17_, contact19_.address_id as address21_7_17_, contact19_.version as version7_17_, contact19_.password as password7_17_, contact19_.username as username7_17_, contact19_.store_id as store17_7_17_, contact19_.firstName as firstName7_17_, contact19_.lastName as lastName7_17_, contact19_.primaryEmail as primaryE7_7_17_, contact19_.secondaryEmail as secondar8_7_17_, contact19_.company_id as company18_7_17_, contact19_.middleInitial as middleIn9_7_17_, contact19_.salutation as salutation7_17_, contact19_.contactSource as contact11_7_17_, contact19_.contactDetail_id as contact16_7_17_, contact19_.contactType as contact12_7_17_, contact19_.registeredUser_id as registe19_7_17_, contact19_.customer_id as customer15_7_17_, contact19_.contactSourceOther as contact13_7_17_, contact
19_.reseller2_id as reseller14_7_17_, contact19_.rep2_id as rep22_7_17_, contact19_.createdBy_id as createdBy20_7_17_, rep20_.id as id16_18_, rep20_.version as version16_18_, contact21_.id as id7_19_, contact21_.address_id as address21_7_19_, contact21_.version as version7_19_, contact21_.password as password7_19_, contact21_.username as username7_19_, contact21_.store_id as store17_7_19_, contact21_.firstName as firstName7_19_, contact21_.lastName as lastName7_19_, contact21_.primaryEmail as primaryE7_7_19_, contact21_.secondaryEmail as secondar8_7_19_, contact21_.company_id as company18_7_19_, contact21_.middleInitial as middleIn9_7_19_, contact21_.salutation as salutation7_19_, contact21_.contactSource as contact11_7_19_, contact21_.contactDetail_id as contact16_7_19_, contact21_.contactType as contact12_7_19_, contact21_.registeredUser_id as registe19_7_19_, contact21_.customer_id as customer15_7_19_, contact21_.contactSourceOther as contact13_7_19_, contact21_.reseller2_id as reseller14_7_19_, contact21_.rep2_id as rep22_7_19_, contact21_.createdBy_id as createdBy20_7_19_, contact22_.id as id7_20_, contact22_.address_id as address21_7_20_, contact22_.version as version7_20_, contact22_.password as password7_20_, contact22_.username as username7_20_, contact22_.store_id as store17_7_20_, contact22_.firstName as firstName7_20_, contact22_.lastName as lastName7_20_, contact22_.primaryEmail as primaryE7_7_20_, contact22_.secondaryEmail as secondar8_7_20_, contact22_.company_id as company18_7_20_, contact22_.middleInitial as middleIn9_7_20_, contact22_.salutation as salutation7_20_, contact22_.contactSource as contact11_7_20_, contact22_.contactDetail_id as contact16_7_20_, contact22_.contactType as contact12_7_20_, contact22_.registeredUser_id as registe19_7_20_, contact22_.customer_id as customer15_7_20_, contact22_.contactSourceOther as contact13_7_20_, contact22_.reseller2_id as reseller14_7_20_, contact22_.rep2_id as rep22_7_20_, contact22_.createdBy_id as createdBy20_7_20_, contact23_.id as id7_21_, contact23_.address_id as address21_7_21_, contact23_.version as version7_21_, contact23_.password as password7_21_, contact23_.username as username7_21_, contact23_.store_id as store17_7_21_, contact23_.firstName as firstName7_21_, contact23_.lastName as lastName7_21_, contact23_.primaryEmail as primaryE7_7_21_, contact23_.secondaryEmail as secondar8_7_21_, contact23_.company_id as company18_7_21_, contact23_.middleInitial as middleIn9_7_21_, contact23_.salutation as salutation7_21_, contact23_.contactSource as contact11_7_21_, contact23_.contactDetail_id as contact16_7_21_, contact23_.contactType as contact12_7_21_, contact23_.registeredUser_id as registe19_7_21_, contact23_.customer_id as customer15_7_21_, contact23_.contactSourceOther as contact13_7_21_, contact23_.reseller2_id as reseller14_7_21_, contact23_.rep2_id as rep22_7_21_, contact23_.createdBy_id as createdBy20_7_21_, contact24_.id as id7_22_, contact24_.address_id as address21_7_22_, contact24_.version as version7_22_, contact24_.password as password7_22_, contact24_.username as username7_22_, contact24_.store_id as store17_7_22_, contact24_.firstName as firstName7_22_, contact24_.lastName as lastName7_22_, contact24_.primaryEmail as primaryE7_7_22_, contact24_.secondaryEmail as secondar8_7_22_, contact24_.company_id as company18_7_22_, contact24_.middleInitial as middleIn9_7_22_, contact24_.salutation as salutation7_22_, contact24_.contactSource as contact11_7_22_, contact24_.contactDetail_id as contact16_7_22_, contact24_.contactType as contact12_7_22_, contact24_.registeredUser_id as registe19_7_22_, contact24_.customer_id as customer15_7_22_, contact24_.contactSourceOther as contact13_7_22_, contact24_.reseller2_id as reseller14_7_22_, contact24_.rep2_id as rep22_7_22_, contact24_.createdBy_id as createdBy20_7_22_, phonenbr25_.id as id13_23_, phonenbr25_.version as version13_23_, phonenbr25_.extension as extension13_23_, phonenbr25_.phoneNbrType as phoneNbr4_13_23_, phonenbr25_.phoneNbrStr as phoneNbr5_13_23_, phonenbr25_.digits as digits13_23_, phonenbr25_.formattedPhoneNbr as formatte7_13_23_, phonenbr25_.countryCode as countryC8_13_23_, retailer26_.id as id6_24_, retailer26_.address_id as address8_6_24_, retailer26_.version as version6_24_, retailer26_.companyName as companyN4_6_24_, retailer26_.phoneNbr_id as phoneNbr10_6_24_, retailer26_.primaryContact_id as primaryC7_6_24_, retailer26_.techContact_id as techCont6_6_24_, retailer26_.adminContact_id as adminCon9_6_24_, retailer26_.website as website6_24_ from Reseller retailerre0_ left outer join Company retailer1_ on retailerre0_.retailer_id=retailer1_.id left outer join Address address2_ on retailer1_.address_id=address2_.id left outer join PhoneNbr phonenbr3_ on retailer1_.phoneNbr_id=phonenbr3_.id left outer join Contact contact4_ on retailer1_.primaryContact_id=contact4_.id left outer join Address address5_ on contact4_.address_id=address5_.id left outer join Store store6_ on contact4_.store_id=store6_.id left outer join Address address7_ on store6_.address_id=address7_.id left outer join Contact contact8_ on store6_.manager_id=contact8_.id left outer join Contact_PhoneNbr phonenbrs9_ on contact8_.id=phonenbrs9_.Contact_id left outer join PhoneNbr phonenbr10_ on phonenbrs9_.phoneNbrs_id=phonenbr10_.id left outer join Company company11_ on contact8_.company_id=company11_.id left outer join Contact contact12_ on company11_.techContact_id=contact12_.id left outer join ContactDetail contactdet13_ on contact12_.contactDetail_id=contactdet13_.id left outer join Contact contact14_ on contactdet13_.assistant_id=contact14_.id left outer join RegisteredUser registered15_ on contact14_.registeredUser_id=registered15_.id left outer join UserGroup usergroup16_ on registered15_.defaultUserGroup_id=usergroup16_.id left outer join Customer customer17_ on contact14_.customer_id=customer17_.id left outer join Reseller reseller18_ on contact14_.reseller2_id=reseller18_.id left outer join Contact contact19_ on reseller18_.contact_id=contact19_.id left outer join Rep rep20_ on contact19_.rep2_id=rep20_.id left outer join Contact contact21_ on contact19_.createdBy_id=contact21_.id left outer join Contact contact22_ on contactdet13_.referredBy_id=contact22_.id left outer join Contact contact23_ on contactdet13_.acctMgr_id=contact23_.id left outer join Contact contact24_ on company11_.adminContact_id=contact24_.id left outer join PhoneNbr phonenbr25_ on store6_.phoneNbr_id=phonenbr25_.id left outer join Company retailer26_ on store6_.retailer_id=retailer26_.id where retailerre0_.retailer_id=? and retailerre0_.DTYPE='RetailerReseller'
Hibernate: select contact0_.id as id7_25_, contact0_.address_id as address21_7_25_, contact0_.version as version7_25_, contact0_.password as password7_25_, contact0_.username as username7_25_, contact0_.store_id as store17_7_25_, contact0_.firstName as firstName7_25_, contact0_.lastName as lastName7_25_, contact0_.primaryEmail as primaryE7_7_25_, contact0_.secondaryEmail as secondar8_7_25_, contact0_.company_id as company18_7_25_, contact0_.middleInitial as middleIn9_7_25_, contact0_.salutation as salutation7_25_, contact0_.contactSource as contact11_7_25_, contact0_.contactDetail_id as contact16_7_25_, contact0_.contactType as contact12_7_25_, contact0_.registeredUser_id as registe19_7_25_, contact0_.customer_id as customer15_7_25_, contact0_.contactSourceOther as contact13_7_25_, contact0_.reseller2_id as reseller14_7_25_, contact0_.rep2_id as rep22_7_25_, contact0_.createdBy_id as createdBy20_7_25_, address1_.id as id4_0_, address1_.state as state4_0_, address1_.country as country4_0_, address1_.version as version4_0_, address1_.address1 as address5_4_0_, address1_.city as city4_0_, address1_.address2 as address7_4_0_, address1_.postalCode as postalCode4_0_, store2_.id as id19_1_, store2_.address_id as address9_19_1_, store2_.version as version19_1_, store2_.manager_id as manager8_19_1_, store2_.phoneNbr_id as phoneNbr7_19_1_, store2_.website as website19_1_, store2_.retailer_id as retailer6_19_1_, store2_.storeName as storeName19_1_, store2_.emailAddr as emailAddr19_1_, address3_.id as id4_2_, address3_.state as state4_2_, address3_.country as country4_2_, address3_.version as version4_2_, address3_.address1 as address5_4_2_, address3_.city as city4_2_, address3_.address2 as address7_4_2_, address3_.postalCode as postalCode4_2_, contact4_.id as id7_3_, contact4_.address_id as address21_7_3_, contact4_.version as version7_3_, contact4_.password as password7_3_, contact4_.username as username7_3_, contact4_.store_id as store17_7_3_, contact4_.firstName as firstName7_3_, contact4_.lastName as lastName7_3_, contact4_.primaryEmail as primaryE7_7_3_, contact4_.secondaryEmail as secondar8_7_3_, contact4_.company_id as company18_7_3_, contact4_.middleInitial as middleIn9_7_3_, contact4_.salutation as salutation7_3_, contact4_.contactSource as contact11_7_3_, contact4_.contactDetail_id as contact16_7_3_, contact4_.contactType as contact12_7_3_, contact4_.registeredUser_id as registe19_7_3_, contact4_.customer_id as customer15_7_3_, contact4_.contactSourceOther as contact13_7_3_, contact4_.reseller2_id as reseller14_7_3_, contact4_.rep2_id as rep22_7_3_, contact4_.createdBy_id as createdBy20_7_3_, phonenbrs5_.Contact_id as Contact1_27_, phonenbr6_.id as phoneNbrs2_27_, phonenbr6_.id as id13_4_, phonenbr6_.version as version13_4_, phonenbr6_.extension as extension13_4_, phonenbr6_.phoneNbrType as phoneNbr4_13_4_, phonenbr6_.phoneNbrStr as phoneNbr5_13_4_, phonenbr6_.digits as digits13_4_, phonenbr6_.formattedPhoneNbr as formatte7_13_4_, phonenbr6_.countryCode as countryC8_13_4_, company7_.id as id6_5_, company7_.address_id as address8_6_5_, company7_.version as version6_5_, company7_.companyName as companyN4_6_5_, company7_.phoneNbr_id as phoneNbr10_6_5_, company7_.primaryContact_id as primaryC7_6_5_, company7_.techContact_id as techCont6_6_5_, company7_.adminContact_id as adminCon9_6_5_, company7_.website as website6_5_, company7_.DTYPE as DTYPE6_5_, address8_.id as id4_6_, address8_.state as state4_6_, address8_.country as country4_6_, address8_.version as version4_6_, address8_.address1 as address5_4_6_, address8_.city as city4_6_, address8_.address2 as address7_4_6_, address8_.postalCode as postalCode4_6_, phonenbr9_.id as id13_7_, phonenbr9_.version as version13_7_, phonenbr9_.extension as extension13_7_, phonenbr9_.phoneNbrType as phoneNbr4_13_7_, phonenbr9_.phoneNbrStr as phoneNbr5_13_7_, phonenbr9_.digits as digits13_7_, phonenbr9_.formattedPhoneNbr as formatte7_13_7_, phonenbr9_.countryCode as countryC8_13_7_, contact10_.id as id7_8_, contact10_.address_id as address21_7_8_, contact10_.version as version7_8_, contact10_.password as password7_8_, contact10_.username as username7_8_, contact10_.store_id as store17_7_8_, contact10_.firstName as firstName7_8_, contact10_.lastName as lastName7_8_, contact10_.primaryEmail as primaryE7_7_8_, contact10_.secondaryEmail as secondar8_7_8_, contact10_.company_id as company18_7_8_, contact10_.middleInitial as middleIn9_7_8_, contact10_.salutation as salutation7_8_, contact10_.contactSource as contact11_7_8_, contact10_.contactDetail_id as contact16_7_8_, contact10_.contactType as contact12_7_8_, contact10_.registeredUser_id as registe19_7_8_, contact10_.customer_id as customer15_7_8_, contact10_.contactSourceOther as contact13_7_8_, contact10_.reseller2_id as reseller14_7_8_, contact10_.rep2_id as rep22_7_8_, contact10_.createdBy_id as createdBy20_7_8_, contactdet11_.id as id8_9_, contactdet11_.version as version8_9_, contactdet11_.title as title8_9_, contactdet11_.notes as notes8_9_, contactdet11_.contactSummary as contactS5_8_9_, contactdet11_.assistant_id as assistant10_8_9_, contactdet11_.department as department8_9_, contactdet11_.referredBy_id as referredBy11_8_9_, contactdet11_.structuredNotes as structur7_8_9_, contactdet11_.interest as interest8_9_, contactdet11_.acctMgr_id as acctMgr9_8_9_, contact12_.id as id7_10_, contact12_.address_id as address21_7_10_, contact12_.version as version7_10_, contact12_.password as password7_10_, contact12_.username as username7_10_, contact12_.store_id as store17_7_10_, contact12_.firstName as firstName7_10_, contact12_.lastName as lastName7_10_, contact12_.primaryEmail as primaryE7_7_10_, contact12_.secondaryEmail as secondar8_7_10_, contact12_.company_id as company18_7_10_, contact12_.middleInitial as middleIn9_7_10_, contact12_.salutation as salutation7_10_, contact12_.contactSource as contact11_7_10_, contact12_.contactDetail_id as contact16_7_10_, contact12_.contactType as contact12_7_10_, contact12_.registeredUser_id as registe19_7_10_, contact12_.customer_id as customer15_7_10_, contact12_.contactSourceOther as contact13_7_10_, contact12_.reseller2_id as reseller14_7_10_, contact12_.rep2_id as rep22_7_10_, contact12_.createdBy_id as createdBy20_7_10_, registered13_.id as id15_11_, registered13_.version as version15_11_, registered13_.enabled as enabled15_11_, registered13_.administrator as administ4_15_11_, registered13_.defaultUserGroup_id as defaultU5_15_11_, usergroup14_.id as id20_12_, usergroup14_.version as version20_12_, usergroup14_.groupName as groupName20_12_, usergroup14_.groupDescription as groupDes4_20_12_, customer15_.id as id9_13_, customer15_.version as version9_13_, reseller16_.id as id11_14_, reseller16_.version as version11_14_, reseller16_.contact_id as contact5_11_14_, reseller16_.retailer_id as retailer4_11_14_, reseller16_.DTYPE as DTYPE11_14_, contact17_.id as id7_15_, contact17_.address_id as address21_7_15_, contact17_.version as version7_15_, contact17_.password as password7_15_, contact17_.username as username7_15_, contact17_.store_id as store17_7_15_, contact17_.firstName as firstName7_15_, contact17_.lastName as lastName7_15_, contact17_.primaryEmail as primaryE7_7_15_, contact17_.secondaryEmail as secondar8_7_15_, contact17_.company_id as company18_7_15_, contact17_.middleInitial as middleIn9_7_15_, contact17_.salutation as salutation7_15_, contact17_.contactSource as contact11_7_15_, contact17_.contactDetail_id as contact16_7_15_, contact17_.contactType as contact12_7_15_, contact17_.registeredUser_id as registe19_7_15_, contact17_.customer_id as customer15_7_15_, contact17_.contactSourceOther as contact13_7_15_, contact17_.reseller2_id as reseller14_7_15_, contact17_.rep2_id as rep22_7_15_, contact17_.createdBy_id as createdBy20_7_15_, rep18_.id as id16_16_, rep18_.version as version16_16_, contact19_.id as id7_17_, contact19_.address_id as address21_7_17_, contact19_.version as version7_17_, contact19_.password as password7_17_, contact19_.username as username7_17_, contact19_.store_id as store17_7_17_, contact19_.firstName as firstName7_17_, contact19_.lastName as lastName7_17_, contact19_.primaryEmail as prima
ryE7_7_17_, contact19_.secondaryEmail as secondar8_7_17_, contact19_.company_id as company18_7_17_, contact19_.middleInitial as middleIn9_7_17_, contact19_.salutation as salutation7_17_, contact19_.contactSource as contact11_7_17_, contact19_.contactDetail_id as contact16_7_17_, contact19_.contactType as contact12_7_17_, contact19_.registeredUser_id as registe19_7_17_, contact19_.customer_id as customer15_7_17_, contact19_.contactSourceOther as contact13_7_17_, contact19_.reseller2_id as reseller14_7_17_, contact19_.rep2_id as rep22_7_17_, contact19_.createdBy_id as createdBy20_7_17_, retailer20_.id as id6_18_, retailer20_.address_id as address8_6_18_, retailer20_.version as version6_18_, retailer20_.companyName as companyN4_6_18_, retailer20_.phoneNbr_id as phoneNbr10_6_18_, retailer20_.primaryContact_id as primaryC7_6_18_, retailer20_.techContact_id as techCont6_6_18_, retailer20_.adminContact_id as adminCon9_6_18_, retailer20_.website as website6_18_, contact21_.id as id7_19_, contact21_.address_id as address21_7_19_, contact21_.version as version7_19_, contact21_.password as password7_19_, contact21_.username as username7_19_, contact21_.store_id as store17_7_19_, contact21_.firstName as firstName7_19_, contact21_.lastName as lastName7_19_, contact21_.primaryEmail as primaryE7_7_19_, contact21_.secondaryEmail as secondar8_7_19_, contact21_.company_id as company18_7_19_, contact21_.middleInitial as middleIn9_7_19_, contact21_.salutation as salutation7_19_, contact21_.contactSource as contact11_7_19_, contact21_.contactDetail_id as contact16_7_19_, contact21_.contactType as contact12_7_19_, contact21_.registeredUser_id as registe19_7_19_, contact21_.customer_id as customer15_7_19_, contact21_.contactSourceOther as contact13_7_19_, contact21_.reseller2_id as reseller14_7_19_, contact21_.rep2_id as rep22_7_19_, contact21_.createdBy_id as createdBy20_7_19_, contact22_.id as id7_20_, contact22_.address_id as address21_7_20_, contact22_.version as version7_20_, contact22_.password as password7_20_, contact22_.username as username7_20_, contact22_.store_id as store17_7_20_, contact22_.firstName as firstName7_20_, contact22_.lastName as lastName7_20_, contact22_.primaryEmail as primaryE7_7_20_, contact22_.secondaryEmail as secondar8_7_20_, contact22_.company_id as company18_7_20_, contact22_.middleInitial as middleIn9_7_20_, contact22_.salutation as salutation7_20_, contact22_.contactSource as contact11_7_20_, contact22_.contactDetail_id as contact16_7_20_, contact22_.contactType as contact12_7_20_, contact22_.registeredUser_id as registe19_7_20_, contact22_.customer_id as customer15_7_20_, contact22_.contactSourceOther as contact13_7_20_, contact22_.reseller2_id as reseller14_7_20_, contact22_.rep2_id as rep22_7_20_, contact22_.createdBy_id as createdBy20_7_20_, contact23_.id as id7_21_, contact23_.address_id as address21_7_21_, contact23_.version as version7_21_, contact23_.password as password7_21_, contact23_.username as username7_21_, contact23_.store_id as store17_7_21_, contact23_.firstName as firstName7_21_, contact23_.lastName as lastName7_21_, contact23_.primaryEmail as primaryE7_7_21_, contact23_.secondaryEmail as secondar8_7_21_, contact23_.company_id as company18_7_21_, contact23_.middleInitial as middleIn9_7_21_, contact23_.salutation as salutation7_21_, contact23_.contactSource as contact11_7_21_, contact23_.contactDetail_id as contact16_7_21_, contact23_.contactType as contact12_7_21_, contact23_.registeredUser_id as registe19_7_21_, contact23_.customer_id as customer15_7_21_, contact23_.contactSourceOther as contact13_7_21_, contact23_.reseller2_id as reseller14_7_21_, contact23_.rep2_id as rep22_7_21_, contact23_.createdBy_id as createdBy20_7_21_, contact24_.id as id7_22_, contact24_.address_id as address21_7_22_, contact24_.version as version7_22_, contact24_.password as password7_22_, contact24_.username as username7_22_, contact24_.store_id as store17_7_22_, contact24_.firstName as firstName7_22_, contact24_.lastName as lastName7_22_, contact24_.primaryEmail as primaryE7_7_22_, contact24_.secondaryEmail as secondar8_7_22_, contact24_.company_id as company18_7_22_, contact24_.middleInitial as middleIn9_7_22_, contact24_.salutation as salutation7_22_, contact24_.contactSource as contact11_7_22_, contact24_.contactDetail_id as contact16_7_22_, contact24_.contactType as contact12_7_22_, contact24_.registeredUser_id as registe19_7_22_, contact24_.customer_id as customer15_7_22_, contact24_.contactSourceOther as contact13_7_22_, contact24_.reseller2_id as reseller14_7_22_, contact24_.rep2_id as rep22_7_22_, contact24_.createdBy_id as createdBy20_7_22_, phonenbr25_.id as id13_23_, phonenbr25_.version as version13_23_, phonenbr25_.extension as extension13_23_, phonenbr25_.phoneNbrType as phoneNbr4_13_23_, phonenbr25_.phoneNbrStr as phoneNbr5_13_23_, phonenbr25_.digits as digits13_23_, phonenbr25_.formattedPhoneNbr as formatte7_13_23_, phonenbr25_.countryCode as countryC8_13_23_, retailer26_.id as id6_24_, retailer26_.address_id as address8_6_24_, retailer26_.version as version6_24_, retailer26_.companyName as companyN4_6_24_, retailer26_.phoneNbr_id as phoneNbr10_6_24_, retailer26_.primaryContact_id as primaryC7_6_24_, retailer26_.techContact_id as techCont6_6_24_, retailer26_.adminContact_id as adminCon9_6_24_, retailer26_.website as website6_24_ from Contact contact0_ left outer join Address address1_ on contact0_.address_id=address1_.id left outer join Store store2_ on contact0_.store_id=store2_.id left outer join Address address3_ on store2_.address_id=address3_.id left outer join Contact contact4_ on store2_.manager_id=contact4_.id left outer join Contact_PhoneNbr phonenbrs5_ on contact4_.id=phonenbrs5_.Contact_id left outer join PhoneNbr phonenbr6_ on phonenbrs5_.phoneNbrs_id=phonenbr6_.id left outer join Company company7_ on contact4_.company_id=company7_.id left outer join Address address8_ on company7_.address_id=address8_.id left outer join PhoneNbr phonenbr9_ on company7_.phoneNbr_id=phonenbr9_.id left outer join Contact contact10_ on company7_.primaryContact_id=contact10_.id left outer join ContactDetail contactdet11_ on contact10_.contactDetail_id=contactdet11_.id left outer join Contact contact12_ on contactdet11_.assistant_id=contact12_.id left outer join RegisteredUser registered13_ on contact12_.registeredUser_id=registered13_.id left outer join UserGroup usergroup14_ on registered13_.defaultUserGroup_id=usergroup14_.id left outer join Customer customer15_ on contact12_.customer_id=customer15_.id left outer join Reseller reseller16_ on contact12_.reseller2_id=reseller16_.id left outer join Contact contact17_ on reseller16_.contact_id=contact17_.id left outer join Rep rep18_ on contact17_.rep2_id=rep18_.id left outer join Contact contact19_ on contact17_.createdBy_id=contact19_.id left outer join Company retailer20_ on reseller16_.retailer_id=retailer20_.id left outer join Contact contact21_ on retailer20_.techContact_id=contact21_.id left outer join Contact contact22_ on retailer20_.adminContact_id=contact22_.id left outer join Contact contact23_ on contactdet11_.referredBy_id=contact23_.id left outer join Contact contact24_ on contactdet11_.acctMgr_id=contact24_.id left outer join PhoneNbr phonenbr25_ on store2_.phoneNbr_id=phonenbr25_.id left outer join Company retailer26_ on store2_.retailer_id=retailer26_.id where contact0_.id=?
Hibernate: select registered0_.id as id15_25_, registered0_.version as version15_25_, registered0_.enabled as enabled15_25_, registered0_.administrator as administ4_15_25_, registered0_.defaultUserGroup_id as defaultU5_15_25_, usergroup1_.id as id20_0_, usergroup1_.version as version20_0_, usergroup1_.groupName as groupName20_0_, usergroup1_.groupDescription as groupDes4_20_0_, contact2_.id as id7_1_, contact2_.address_id as address21_7_1_, contact2_.version as version7_1_, contact2_.password as password7_1_, contact2_.username as username7_1_, contact2_.store_id as store17_7_1_, contact2_.firstName as firstName7_1_, contact2_.lastName as lastName7_1_, contact2_.primaryEmail as primaryE7_7_1_, contact2_.secondaryEmail as secondar8_7_1_, contact2_.company_id as company18_7_1_, contact2_.middleInitial as middleIn9_7_1_, contact2_.salutation as salutation7_1_, contact2_.contactSource as contact11_7_1_, contact2_.contactDetail_id as contact16_7_1_, contact2_.contactType as contact12_7_1_, contact2_.registeredUser_id as registe19_7_1_, contact2_.customer_id as customer15_7_1_, contact2_.contactSourceOther as contact13_7_1_, contact2_.reseller2_id as reseller14_7_1_, contact2_.rep2_id as rep22_7_1_, contact2_.createdBy_id as createdBy20_7_1_, address3_.id as id4_2_, address3_.state as state4_2_, address3_.country as country4_2_, address3_.version as version4_2_, address3_.address1 as address5_4_2_, address3_.city as city4_2_, address3_.address2 as address7_4_2_, address3_.postalCode as postalCode4_2_, store4_.id as id19_3_, store4_.address_id as address9_19_3_, store4_.version as version19_3_, store4_.manager_id as manager8_19_3_, store4_.phoneNbr_id as phoneNbr7_19_3_, store4_.website as website19_3_, store4_.retailer_id as retailer6_19_3_, store4_.storeName as storeName19_3_, store4_.emailAddr as emailAddr19_3_, address5_.id as id4_4_, address5_.state as state4_4_, address5_.country as country4_4_, address5_.version as version4_4_, address5_.address1 as address5_4_4_, address5_.city as city4_4_, address5_.address2 as address7_4_4_, address5_.postalCode as postalCode4_4_, contact6_.id as id7_5_, contact6_.address_id as address21_7_5_, contact6_.version as version7_5_, contact6_.password as password7_5_, contact6_.username as username7_5_, contact6_.store_id as store17_7_5_, contact6_.firstName as firstName7_5_, contact6_.lastName as lastName7_5_, contact6_.primaryEmail as primaryE7_7_5_, contact6_.secondaryEmail as secondar8_7_5_, contact6_.company_id as company18_7_5_, contact6_.middleInitial as middleIn9_7_5_, contact6_.salutation as salutation7_5_, contact6_.contactSource as contact11_7_5_, contact6_.contactDetail_id as contact16_7_5_, contact6_.contactType as contact12_7_5_, contact6_.registeredUser_id as registe19_7_5_, contact6_.customer_id as customer15_7_5_, contact6_.contactSourceOther as contact13_7_5_, contact6_.reseller2_id as reseller14_7_5_, contact6_.rep2_id as rep22_7_5_, contact6_.createdBy_i
_________________ Rick Horowitz
---------
Please remember to rate...
|