Hibernate version:
Annotations: Version: 3.3.0.GA
Core: version 3.2.3 GA
EntityManager: 3.3.1.GA
Hi,
I am using Java standalone (i.e. no app server) and an application managed Entity manager.
I am getting a strange error when trying to refresh a persistent entity, using the refresh API()
I do:
Code:
entityManager.clear();
entityManager.refresh(employee); // employee is persistent
I get:
java.lang.IllegalArgumentException: Entity not managed
I then do:
Code:
entityManager.clear();
entityManager.merge(employee);
entityManager.refresh(employee);
I still get:
java.lang.IllegalArgumentException: Entity not managed upon the refresh() invocation.
I did not get this behavior when using the following versions:
Annotations: Version: 3.2.0 CR1
Core: version 3.2 cr2
EntityManager: Version: 3.2.0.CR1 only when using the latest versions mentioned at top of post.
Note the trace from hibernate for the merge is:
[size=9]
Hibernate: select drives0_.C_FROM as C1_16_, drives0_.I_FROM as I2_16_, drives0_.C_TO as C3_16_, drives0_.I_TO as I4_16_, car1_.c as c7_0_, car1_.i as i7_0_, car1_.boeVersion as boeVersion7_0_, car1_.flags as flags7_0_, car1_.LASTUPDATEDATE as LASTUPDA5_7_0_, car1_.C_OSUSER_UPDATEDBY as C6_7_0_, car1_.I_OSUSER_UPDATEDBY as I7_7_0_, car1_.C_CUSTOMR_OWNS as C11_7_0_, car1_.I_CUSTOMR_OWNS as I12_7_0_, car1_.mileage as mileage7_0_, car1_.registration as registra9_7_0_, car1_.stereo as stereo7_0_, customer2_.c as c0_1_, customer2_.i as i0_1_, customer2_.boeVersion as boeVersion0_1_, customer2_.flags as flags0_1_, customer2_.LASTUPDATEDATE as LASTUPDA5_0_1_, customer2_.C_OSUSER_UPDATEDBY as C6_0_1_, customer2_.I_OSUSER_UPDATEDBY as I7_0_1_, customer2_.C_PERSON_BESTFRIEND as C25_0_1_, customer2_.I_PERSON_BESTFRIEND as I26_0_1_, customer2_.DATEOFBIRTH as DATEOFBI8_0_1_, customer2_.firstName as firstName0_1_, customer2_.C_ADDRESS_HOMEADDRESS as C23_0_1_, customer2_.I_ADDRESS_HOMEADDRESS as I24_0_1_, customer2_.insuranNo as insuranNo0_1_, customer2_.insurance as insurance0_1_, customer2_.lastName as lastName0_1_, customer2_.pension as pension0_1_, customer2_.secondTitle as secondT14_0_1_, customer2_.sex as sex0_1_, customer2_.C_PERSON_SPOUSE as C21_0_1_, customer2_.I_PERSON_SPOUSE as I22_0_1_, customer2_.taxArea as taxArea0_1_, customer2_.taxCode as taxCode0_1_, customer2_.title as title0_1_, customer2_.WAGE_MONAMT as WAGE19_0_1_, customer2_.WAGE_MONCUR as WAGE20_0_1_, customer2_.CUSTOMERNUMBE as CUSTOMER1_6_1_, person3_.c as c0_2_, person3_.i as i0_2_, person3_.boeVersion as boeVersion0_2_, person3_.flags as flags0_2_, person3_.LASTUPDATEDATE as LASTUPDA5_0_2_, person3_.C_OSUSER_UPDATEDBY as C6_0_2_, person3_.I_OSUSER_UPDATEDBY as I7_0_2_, person3_.C_PERSON_BESTFRIEND as C25_0_2_, person3_.I_PERSON_BESTFRIEND as I26_0_2_, person3_.DATEOFBIRTH as DATEOFBI8_0_2_, person3_.firstName as firstName0_2_, person3_.C_ADDRESS_HOMEADDRESS as C23_0_2_, person3_.I_ADDRESS_HOMEADDRESS as I24_0_2_, person3_.insuranNo as insuranNo0_2_, person3_.insurance as insurance0_2_, person3_.lastName as lastName0_2_, person3_.pension as pension0_2_, person3_.secondTitle as secondT14_0_2_, person3_.sex as sex0_2_, person3_.C_PERSON_SPOUSE as C21_0_2_, person3_.I_PERSON_SPOUSE as I22_0_2_, person3_.taxArea as taxArea0_2_, person3_.taxCode as taxCode0_2_, person3_.title as title0_2_, person3_.WAGE_MONAMT as WAGE19_0_2_, person3_.WAGE_MONCUR as WAGE20_0_2_, person3_.clobAttr as clobAttr1_2_, person3_.C_COMPANY_EMPLOYEES as C8_1_2_, person3_.I_COMPANY_EMPLOYEES as I9_1_2_, person3_.EmployeeNumbe as Employee2_1_2_, person3_.rsi as rsi1_2_, person3_.SALARY_MONAMT as SALARY4_1_2_, person3_.SALARY_MONCUR as SALARY5_1_2_, person3_.C_EMPLOYE_TEAM as C6_1_2_, person3_.I_EMPLOYE_TEAM as I7_1_2_, person3_.email as email2_2_, person3_.grade as grade2_2_, person3_.CUSTOMERNUMBE as CUSTOMER1_6_2_, person3_.clazz_ as clazz_2_, person4_.c as c0_3_, person4_.i as i0_3_, person4_.boeVersion as boeVersion0_3_, person4_.flags as flags0_3_, person4_.LASTUPDATEDATE as LASTUPDA5_0_3_, person4_.C_OSUSER_UPDATEDBY as C6_0_3_, person4_.I_OSUSER_UPDATEDBY as I7_0_3_, person4_.C_PERSON_BESTFRIEND as C25_0_3_, person4_.I_PERSON_BESTFRIEND as I26_0_3_, person4_.DATEOFBIRTH as DATEOFBI8_0_3_, person4_.firstName as firstName0_3_, person4_.C_ADDRESS_HOMEADDRESS as C23_0_3_, person4_.I_ADDRESS_HOMEADDRESS as I24_0_3_, person4_.insuranNo as insuranNo0_3_, person4_.insurance as insurance0_3_, person4_.lastName as lastName0_3_, person4_.pension as pension0_3_, person4_.secondTitle as secondT14_0_3_, person4_.sex as sex0_3_, person4_.C_PERSON_SPOUSE as C21_0_3_, person4_.I_PERSON_SPOUSE as I22_0_3_, person4_.taxArea as taxArea0_3_, person4_.taxCode as taxCode0_3_, person4_.title as title0_3_, person4_.WAGE_MONAMT as WAGE19_0_3_, person4_.WAGE_MONCUR as WAGE20_0_3_, person4_.clobAttr as clobAttr1_3_, person4_.C_COMPANY_EMPLOYEES as C8_1_3_, person4_.I_COMPANY_EMPLOYEES as I9_1_3_, person4_.EmployeeNumbe as Employee2_1_3_, person4_.rsi as rsi1_3_, person4_.SALARY_MONAMT as SALARY4_1_3_, person4_.SALARY_MONCUR as SALARY5_1_3_, person4_.C_EMPLOYE_TEAM as C6_1_3_, person4_.I_EMPLOYE_TEAM as I7_1_3_, person4_.email as email2_3_, person4_.grade as grade2_3_, person4_.CUSTOMERNUMBE as CUSTOMER1_6_3_, person4_.clazz_ as clazz_3_, address5_.c as c5_4_, address5_.i as i5_4_, address5_.boeVersion as boeVersion5_4_, address5_.flags as flags5_4_, address5_.LASTUPDATEDATE as LASTUPDA5_5_4_, address5_.C_OSUSER_UPDATEDBY as C6_5_4_, address5_.I_OSUSER_UPDATEDBY as I7_5_4_, address5_.city as city5_4_, address5_.country as country5_4_, address5_.postCode as postCode5_4_, address5_.street as street5_4_, company6_.c as c3_5_, company6_.i as i3_5_, company6_.boeVersion as boeVersion3_5_, company6_.flags as flags3_5_, company6_.LASTUPDATEDATE as LASTUPDA5_3_5_, company6_.C_OSUSER_UPDATEDBY as C6_3_5_, company6_.I_OSUSER_UPDATEDBY as I7_3_5_, company6_.C_ADDRESS_ADDRESS as C10_3_5_, company6_.I_ADDRESS_ADDRESS as I11_3_5_, company6_.name as name3_5_, company6_.registeredNum as register9_3_5_, person7_.c as c0_6_, person7_.i as i0_6_, person7_.boeVersion as boeVersion0_6_, person7_.flags as flags0_6_, person7_.LASTUPDATEDATE as LASTUPDA5_0_6_, person7_.C_OSUSER_UPDATEDBY as C6_0_6_, person7_.I_OSUSER_UPDATEDBY as I7_0_6_, person7_.C_PERSON_BESTFRIEND as C25_0_6_, person7_.I_PERSON_BESTFRIEND as I26_0_6_, person7_.DATEOFBIRTH as DATEOFBI8_0_6_, person7_.firstName as firstName0_6_, person7_.C_ADDRESS_HOMEADDRESS as C23_0_6_, person7_.I_ADDRESS_HOMEADDRESS as I24_0_6_, person7_.insuranNo as insuranNo0_6_, person7_.insurance as insurance0_6_, person7_.lastName as lastName0_6_, person7_.pension as pension0_6_, person7_.secondTitle as secondT14_0_6_, person7_.sex as sex0_6_, person7_.C_PERSON_SPOUSE as C21_0_6_, person7_.I_PERSON_SPOUSE as I22_0_6_, person7_.taxArea as taxArea0_6_, person7_.taxCode as taxCode0_6_, person7_.title as title0_6_, person7_.WAGE_MONAMT as WAGE19_0_6_, person7_.WAGE_MONCUR as WAGE20_0_6_, person7_.clobAttr as clobAttr1_6_, person7_.C_COMPANY_EMPLOYEES as C8_1_6_, person7_.I_COMPANY_EMPLOYEES as I9_1_6_, person7_.EmployeeNumbe as Employee2_1_6_, person7_.rsi as rsi1_6_, person7_.SALARY_MONAMT as SALARY4_1_6_, person7_.SALARY_MONCUR as SALARY5_1_6_, person7_.C_EMPLOYE_TEAM as C6_1_6_, person7_.I_EMPLOYE_TEAM as I7_1_6_, person7_.email as email2_6_, person7_.grade as grade2_6_, person7_.CUSTOMERNUMBE as CUSTOMER1_6_6_, person7_.clazz_ as clazz_6_, company8_.c as c3_7_, company8_.i as i3_7_, company8_.boeVersion as boeVersion3_7_, company8_.flags as flags3_7_, company8_.LASTUPDATEDATE as LASTUPDA5_3_7_, company8_.C_OSUSER_UPDATEDBY as C6_3_7_, company8_.I_OSUSER_UPDATEDBY as I7_3_7_, company8_.C_ADDRESS_ADDRESS as C10_3_7_, company8_.I_ADDRESS_ADDRESS as I11_3_7_, company8_.name as name3_7_, company8_.registeredNum as register9_3_7_, employee9_.c as c0_8_, employee9_.i as i0_8_, employee9_.boeVersion as boeVersion0_8_, employee9_.flags as flags0_8_, employee9_.LASTUPDATEDATE as LASTUPDA5_0_8_, employee9_.C_OSUSER_UPDATEDBY as C6_0_8_, employee9_.I_OSUSER_UPDATEDBY as I7_0_8_, employee9_.C_PERSON_BESTFRIEND as C25_0_8_, employee9_.I_PERSON_BESTFRIEND as I26_0_8_, employee9_.DATEOFBIRTH as DATEOFBI8_0_8_, employee9_.firstName as firstName0_8_, employee9_.C_ADDRESS_HOMEADDRESS as C23_0_8_, employee9_.I_ADDRESS_HOMEADDRESS as I24_0_8_, employee9_.insuranNo as insuranNo0_8_, employee9_.insurance as insurance0_8_, employee9_.lastName as lastName0_8_, employee9_.pension as pension0_8_, employee9_.secondTitle as secondT14_0_8_, employee9_.sex as sex0_8_, employee9_.C_PERSON_SPOUSE as C21_0_8_, employee9_.I_PERSON_SPOUSE as I22_0_8_, employee9_.taxArea as taxArea0_8_, employee9_.taxCode as taxCode0_8_, employee9_.title as title0_8_, employee9_.WAGE_MONAMT as WAGE19_0_8_, employee9_.WAGE_MONCUR as WAGE20_0_8_, employee9_.clobAttr as clobAttr1_8_, employee9_.C_COMPANY_EMPLOYEES as C8_1_8_, employee9_.I_COMPANY_EMPLOYEES as I9_1_8_, employee9_.EmployeeNumbe as Employee2_1_8_, employee9_.rsi as rsi1_8_, employee9_.SALARY_MONAMT as SALARY4_1_8_, employee9_.SALARY_MONCUR as SALARY5_1_8_, employee9_.C_EMPLOYE_TEAM as C6_1_8_, employee9_.I_EMPLOYE_TEAM as I7_1_8_, employee9_.email as email2_8_, employee9_.grade as grade2_8_, employee9_.clazz_ as clazz_8_, person10_.c as c0_9_, person10_.i as i0_9_, person10_.boeVersion as boeVersion0_9_, person10_.flags as flags0_9_, person10_.LASTUPDATEDATE as LASTUPDA5_0_9_, person10_.C_OSUSER_UPDATEDBY as C6_0_9_, person10_.I_OSUSER_UPDATEDBY as I7_0_9_, person10_.C_PERSON_BESTFRIEND as C25_0_9_, person10_.I_PERSON_BESTFRIEND as I26_0_9_, person10_.DATEOFBIRTH as DATEOFBI8_0_9_, person10_.firstName as firstName0_9_, person10_.C_ADDRESS_HOMEADDRESS as C23_0_9_, person10_.I_ADDRESS_HOMEADDRESS as I24_0_9_, person10_.insuranNo as insuranNo0_9_, person10_.insurance as insurance0_9_, person10_.lastName as lastName0_9_, person10_.pension as pension0_9_, person10_.secondTitle as secondT14_0_9_, person10_.sex as sex0_9_, person10_.C_PERSON_SPOUSE as C21_0_9_, person10_.I_PERSON_SPOUSE as I22_0_9_, person10_.taxArea as taxArea0_9_, person10_.taxCode as taxCode0_9_, person10_.title as title0_9_, person10_.WAGE_MONAMT as WAGE19_0_9_, person10_.WAGE_MONCUR as WAGE20_0_9_, person10_.clobAttr as clobAttr1_9_, person10_.C_COMPANY_EMPLOYEES as C8_1_9_, person10_.I_COMPANY_EMPLOYEES as I9_1_9_, person10_.EmployeeNumbe as Employee2_1_9_, person10_.rsi as rsi1_9_, person10_.SALARY_MONAMT as SALARY4_1_9_, person10_.SALARY_MONCUR as SALARY5_1_9_, person10_.C_EMPLOYE_TEAM as C6_1_9_, person10_.I_EMPLOYE_TEAM as I7_1_9_, person10_.email as email2_9_, person10_.grade as grade2_9_, person10_.CUSTOMERNUMBE as CUSTOMER1_6_9_, person10_.clazz_ as clazz_9_, address11_.c as c5_10_, address11_.i as i5_10_, address11_.boeVersion as boeVersion5_10_, address11_.flags as flags5_10_, address11_.LASTUPDATEDATE as LASTUPDA5_5_10_, address11_.C_OSUSER_UPDATEDBY as C6_5_10_, address11_.I_OSUSER_UPDATEDBY as I7_5_10_, address11_.city as city5_10_, address11_.country as country5_10_, address11_.postCode as postCode5_10_, address11_.street as street5_10_, person12_.c as c0_11_, person12_.i as i0_11_, person12_.boeVersion as boeVersion0_11_, person12_.flags as flags0_11_, person12_.LASTUPDATEDATE as LASTUPDA5_0_11_, person12_.C_OSUSER_UPDATEDBY as C6_0_11_, person12_.I_OSUSER_UPDATEDBY as I7_0_11_, person12_.C_PERSON_BESTFRIEND as C25_0_11_, person12_.I_PERSON_BESTFRIEND as I26_0_11_, person12_.DATEOFBIRTH as DATEOFBI8_0_11_, person12_.firstName as firstName0_11_, person12_.C_ADDRESS_HOMEADDRESS as C23_0_11_, person12_.I_ADDRESS_HOMEADDRESS as I24_0_11_, person12_.insuranNo as insuranNo0_11_, person12_.insurance as insurance0_11_, person12_.lastName as lastName0_11_, person12_.pension as pension0_11_, person12_.secondTitle as secondT14_0_11_, person12_.sex as sex0_11_, person12_.C_PERSON_SPOUSE as C21_0_11_, person12_.I_PERSON_SPOUSE as I22_0_11_, person12_.taxArea as taxArea0_11_, person12_.taxCode as taxCode0_11_, person12_.title as title0_11_, person12_.WAGE_MONAMT as WAGE19_0_11_, person12_.WAGE_MONCUR as WAGE20_0_11_, person12_.clobAttr as clobAttr1_11_, person12_.C_COMPANY_EMPLOYEES as C8_1_11_, person12_.I_COMPANY_EMPLOYEES as I9_1_11_, person12_.EmployeeNumbe as Employee2_1_11_, person12_.rsi as rsi1_11_, person12_.SALARY_MONAMT as SALARY4_1_11_, person12_.SALARY_MONCUR as SALARY5_1_11_, person12_.C_EMPLOYE_TEAM as C6_1_11_, person12_.I_EMPLOYE_TEAM as I7_1_11_, person12_.email as email2_11_, person12_.grade as grade2_11_, person12_.CUSTOMERNUMBE as CUSTOMER1_6_11_, person12_.clazz_ as clazz_11_, company13_.c as c3_12_, company13_.i as i3_12_, company13_.boeVersion as boeVersion3_12_, company13_.flags as flags3_12_, company13_.LASTUPDATEDATE as LASTUPDA5_3_12_, company13_.C_OSUSER_UPDATEDBY as C6_3_12_, company13_.I_OSUSER_UPDATEDBY as I7_3_12_, company13_.C_ADDRESS_ADDRESS as C10_3_12_, company13_.I_ADDRESS_ADDRESS as I11_3_12_, company13_.name as name3_12_, company13_.registeredNum as register9_3_12_, employee14_.c as c0_13_, employee14_.i as i0_13_, employee14_.boeVersion as boeVersion0_13_, employee14_.flags as flags0_13_, employee14_.LASTUPDATEDATE as LASTUPDA5_0_13_, employee14_.C_OSUSER_UPDATEDBY as C6_0_13_, employee14_.I_OSUSER_UPDATEDBY as I7_0_13_, employee14_.C_PERSON_BESTFRIEND as C25_0_13_, employee14_.I_PERSON_BESTFRIEND as I26_0_13_, employee14_.DATEOFBIRTH as DATEOFBI8_0_13_, employee14_.firstName as firstName0_13_, employee14_.C_ADDRESS_HOMEADDRESS as C23_0_13_, employee14_.I_ADDRESS_HOMEADDRESS as I24_0_13_, employee14_.insuranNo as insuranNo0_13_, employee14_.insurance as insurance0_13_, employee14_.lastName as lastName0_13_, employee14_.pension as pension0_13_, employee14_.secondTitle as secondT14_0_13_, employee14_.sex as sex0_13_, employee14_.C_PERSON_SPOUSE as C21_0_13_, employee14_.I_PERSON_SPOUSE as I22_0_13_, employee14_.taxArea as taxArea0_13_, employee14_.taxCode as taxCode0_13_, employee14_.title as title0_13_, employee14_.WAGE_MONAMT as WAGE19_0_13_, employee14_.WAGE_MONCUR as WAGE20_0_13_, employee14_.clobAttr as clobAttr1_13_, employee14_.C_COMPANY_EMPLOYEES as C8_1_13_, employee14_.I_COMPANY_EMPLOYEES as I9_1_13_, employee14_.EmployeeNumbe as Employee2_1_13_, employee14_.rsi as rsi1_13_, employee14_.SALARY_MONAMT as SALARY4_1_13_, employee14_.SALARY_MONCUR as SALARY5_1_13_, employee14_.C_EMPLOYE_TEAM as C6_1_13_, employee14_.I_EMPLOYE_TEAM as I7_1_13_, employee14_.email as email2_13_, employee14_.grade as grade2_13_, employee14_.clazz_ as clazz_13_, address15_.c as c5_14_, address15_.i as i5_14_, address15_.boeVersion as boeVersion5_14_, address15_.flags as flags5_14_, address15_.LASTUPDATEDATE as LASTUPDA5_5_14_, address15_.C_OSUSER_UPDATEDBY as C6_5_14_, address15_.I_OSUSER_UPDATEDBY as I7_5_14_, address15_.city as city5_14_, address15_.country as country5_14_, address15_.postCode as postCode5_14_, address15_.street as street5_14_, person16_.c as c0_15_, person16_.i as i0_15_, person16_.boeVersion as boeVersion0_15_, person16_.flags as flags0_15_, person16_.LASTUPDATEDATE as LASTUPDA5_0_15_, person16_.C_OSUSER_UPDATEDBY as C6_0_15_, person16_.I_OSUSER_UPDATEDBY as I7_0_15_, person16_.C_PERSON_BESTFRIEND as C25_0_15_, person16_.I_PERSON_BESTFRIEND as I26_0_15_, person16_.DATEOFBIRTH as DATEOFBI8_0_15_, person16_.firstName as firstName0_15_, person16_.C_ADDRESS_HOMEADDRESS as C23_0_15_, person16_.I_ADDRESS_HOMEADDRESS as I24_0_15_, person16_.insuranNo as insuranNo0_15_, person16_.insurance as insurance0_15_, person16_.lastName as lastName0_15_, person16_.pension as pension0_15_, person16_.secondTitle as secondT14_0_15_, person16_.sex as sex0_15_, person16_.C_PERSON_SPOUSE as C21_0_15_, person16_.I_PERSON_SPOUSE as I22_0_15_, person16_.taxArea as taxArea0_15_, person16_.taxCode as taxCode0_15_, person16_.title as title0_15_, person16_.WAGE_MONAMT as WAGE19_0_15_, person16_.WAGE_MONCUR as WAGE20_0_15_, person16_.clobAttr as clobAttr1_15_, person16_.C_COMPANY_EMPLOYEES as C8_1_15_, person16_.I_COMPANY_EMPLOYEES as I9_1_15_, person16_.EmployeeNumbe as Employee2_1_15_, person16_.rsi as rsi1_15_, person16_.SALARY_MONAMT as SALARY4_1_15_, person16_.SALARY_MONCUR as SALARY5_1_15_, person16_.C_EMPLOYE_TEAM as C6_1_15_, person16_.I_EMPLOYE_TEAM as I7_1_15_, person16_.email as email2_15_, person16_.grade as grade2_15_, person16_.CUSTOMERNUMBE as CUSTOMER1_6_15_, person16_.clazz_ as clazz_15_ from RPERSONCARDRIVES drives0_ left outer join TCar car1_ on drives0_.C_TO=car1_.c and drives0_.I_TO=car1_.i left outer join TCustomer customer2_ on car1_.C_CUSTOMR_OWNS=customer2_.c and car1_.I_CUSTOMR_OWNS=customer2_.i left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person3_ on customer2_.C_PERSON_BESTFRIEND=person3_.c and customer2_.I_PERSON_BESTFRIEND=person3_.i left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person4_ on person3_.C_PERSON_BESTFRIEND=person4_.c and person3_.I_PERSON_BESTFRIEND=person4_.i left outer join TAddress address5_ on person4_.C_ADDRESS_HOMEADDRESS=address5_.c and person4_.I_ADDRESS_HOMEADDRESS=address5_.i left outer join TCompany company6_ on address5_.c=company6_.C_ADDRESS_ADDRESS and address5_.i=company6_.I_ADDRESS_ADDRESS left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person7_ on person4_.C_PERSON_SPOUSE=person7_.c and person4_.I_PERSON_SPOUSE=person7_.i left outer join TCompany company8_ on person7_.C_COMPANY_EMPLOYEES=company8_.c and person7_.I_COMPANY_EMPLOYEES=company8_.i left outer join ( select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic ) employee9_ on person7_.C_EMPLOYE_TEAM=employee9_.c and person7_.I_EMPLOYE_TEAM=employee9_.i left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person10_ on employee9_.C_PERSON_BESTFRIEND=person10_.c and employee9_.I_PERSON_BESTFRIEND=person10_.i left outer join TAddress address11_ on employee9_.C_ADDRESS_HOMEADDRESS=address11_.c and employee9_.I_ADDRESS_HOMEADDRESS=address11_.i left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person12_ on employee9_.C_PERSON_SPOUSE=person12_.c and employee9_.I_PERSON_SPOUSE=person12_.i left outer join TCompany company13_ on employee9_.C_COMPANY_EMPLOYEES=company13_.c and employee9_.I_COMPANY_EMPLOYEES=company13_.i left outer join ( select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic ) employee14_ on employee9_.C_EMPLOYE_TEAM=employee14_.c and employee9_.I_EMPLOYE_TEAM=employee14_.i left outer join TAddress address15_ on customer2_.C_ADDRESS_HOMEADDRESS=address15_.c and customer2_.I_ADDRESS_HOMEADDRESS=address15_.i left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person16_ on customer2_.C_PERSON_SPOUSE=person16_.c and customer2_.I_PERSON_SPOUSE=person16_.i where drives0_.C_FROM=? and drives0_.I_FROM=?
12:37:36,610 DEBUG AbstractBatcher:484 - preparing statement
12:37:36,751 DEBUG AbstractBatcher:382 - about to open ResultSet (open ResultSets: 0, globally: 0)
12:37:36,751 DEBUG Loader:1054 - result set contains (possibly empty) collection: [com.fineos.ta3g.test.garage.Person.drives#component[c,i]{i=1756, c=3006}]
12:37:36,766 DEBUG LoadContexts:79 - constructing collection load context for result set [com.microsoft.sqlserver.jdbc.SQLServerResultSet@1425f38]
12:37:36,766 DEBUG CollectionLoadContext:90 - starting attempt to find loading collection [[com.fineos.ta3g.test.garage.Person.drives#C=3006,I=1756]]
12:37:36,766 DEBUG CollectionLoadContext:147 - attempting to locate loading collection entry [CollectionKey[com.fineos.ta3g.test.garage.Person.drives#component[c,i]{i=1756, c=3006}]]
12:37:36,766 DEBUG CollectionLoadContext:161 - attempting to locally locate loading collection entry [key=CollectionKey[com.fineos.ta3g.test.garage.Person.drives#component[c,i]{i=1756, c=3006}], rs=com.microsoft.sqlserver.jdbc.SQLServerResultSet@1425f38]
12:37:36,782 DEBUG LoadContexts:129 - attempting to locate loading collection entry [CollectionKey[com.fineos.ta3g.test.garage.Person.drives#component[c,i]{i=1756, c=3006}]] in any result-set context
12:37:36,782 DEBUG CollectionLoadContext:161 - attempting to locally locate loading collection entry [key=CollectionKey[com.fineos.ta3g.test.garage.Person.drives#component[c,i]{i=1756, c=3006}], rs=com.microsoft.sqlserver.jdbc.SQLServerResultSet@14481bb]
12:37:36,782 DEBUG CollectionLoadContext:161 - attempting to locally locate loading collection entry [key=CollectionKey[com.fineos.ta3g.test.garage.Person.drives#component[c,i]{i=1756, c=3006}], rs=com.microsoft.sqlserver.jdbc.SQLServerResultSet@1ab7626]
12:37:36,798 DEBUG CollectionLoadContext:103 - collection not yet initialized; initializing
12:37:36,798 DEBUG Loader:694 - processing result set
12:37:36,798 DEBUG Loader:721 - done processing result set (0 rows)
12:37:36,798 DEBUG AbstractBatcher:389 - about to close ResultSet (open ResultSets: 1, globally: 1)
12:37:36,813 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:37:36,813 DEBUG AbstractBatcher:533 - closing statement
12:37:36,813 DEBUG ConnectionManager:404 - aggressively releasing JDBC connection
12:37:36,813 DEBUG ConnectionManager:441 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
12:37:36,829 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
12:37:36,829 DEBUG Loader:851 - total objects hydrated: 0
12:37:36,829 DEBUG CollectionLoadContext:198 - removing collection load entry [org.hibernate.engine.loading.LoadingCollectionEntry<rs=com.microsoft.sqlserver.jdbc.SQLServerResultSet@1425f38, coll=[com.fineos.ta3g.test.garage.Person.drives#C=3006,I=1756]>@798249]
12:37:36,829 DEBUG CollectionLoadContext:211 - 1 collections were found in result set for role: com.fineos.ta3g.test.garage.Person.drives
12:37:36,845 DEBUG CollectionLoadContext:226 - ending loading collection [org.hibernate.engine.loading.LoadingCollectionEntry<rs=com.microsoft.sqlserver.jdbc.SQLServerResultSet@1425f38, coll=[com.fineos.ta3g.test.garage.Person.drives#C=3006,I=1756]>@798249]
12:37:36,845 DEBUG CollectionLoadContext:254 - collection fully initialized: [com.fineos.ta3g.test.garage.Person.drives#component[c,i]{i=1756, c=3006}]
12:37:36,845 DEBUG CollectionLoadContext:220 - 1 collections initialized for role: com.fineos.ta3g.test.garage.Person.drives
12:37:36,845 DEBUG StatefulPersistenceContext:778 - initializing non-lazy collections
12:37:36,860 DEBUG Loader:2010 - done loading collection
12:37:36,860 DEBUG DefaultInitializeCollectionEventListener:61 - collection initialized
12:37:36,860 DEBUG DefaultInitializeCollectionEventListener:41 - initializing collection [com.fineos.ta3g.test.garage.Person.family#component[c,i]{i=1756, c=3006}]
12:37:36,860 DEBUG DefaultInitializeCollectionEventListener:47 - checking second-level cache
12:37:36,876 DEBUG DefaultInitializeCollectionEventListener:59 - collection not cached
12:37:36,876 DEBUG Loader:1986 - loading collection: [com.fineos.ta3g.test.garage.Person.family#component[c,i]{i=1756, c=3006}]
12:37:36,876 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:37:36,876 DEBUG ConnectionManager:421 - opening JDBC connection
12:37:36,891 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 2
12:37:36,891 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
12:37:36,891 DEBUG SQL:401 - select family0_.C_FROM as C1_12_, family0_.I_FROM as I2_12_, family0_.C_TO as C3_12_, family0_.I_TO as I4_12_, person1_.c as c0_0_, person1_.i as i0_0_, person1_.boeVersion as boeVersion0_0_, person1_.flags as flags0_0_, person1_.LASTUPDATEDATE as LASTUPDA5_0_0_, person1_.C_OSUSER_UPDATEDBY as C6_0_0_, person1_.I_OSUSER_UPDATEDBY as I7_0_0_, person1_.C_PERSON_BESTFRIEND as C25_0_0_, person1_.I_PERSON_BESTFRIEND as I26_0_0_, person1_.DATEOFBIRTH as DATEOFBI8_0_0_, person1_.firstName as firstName0_0_, person1_.C_ADDRESS_HOMEADDRESS as C23_0_0_, person1_.I_ADDRESS_HOMEADDRESS as I24_0_0_, person1_.insuranNo as insuranNo0_0_, person1_.insurance as insurance0_0_, person1_.lastName as lastName0_0_, person1_.pension as pension0_0_, person1_.secondTitle as secondT14_0_0_, person1_.sex as sex0_0_, person1_.C_PERSON_SPOUSE as C21_0_0_, person1_.I_PERSON_SPOUSE as I22_0_0_, person1_.taxArea as taxArea0_0_, person1_.taxCode as taxCode0_0_, person1_.title as title0_0_, person1_.WAGE_MONAMT as WAGE19_0_0_, person1_.WAGE_MONCUR as WAGE20_0_0_, person1_.clobAttr as clobAttr1_0_, person1_.C_COMPANY_EMPLOYEES as C8_1_0_, person1_.I_COMPANY_EMPLOYEES as I9_1_0_, person1_.EmployeeNumbe as Employee2_1_0_, person1_.rsi as rsi1_0_, person1_.SALARY_MONAMT as SALARY4_1_0_, person1_.SALARY_MONCUR as SALARY5_1_0_, person1_.C_EMPLOYE_TEAM as C6_1_0_, person1_.I_EMPLOYE_TEAM as I7_1_0_, person1_.email as email2_0_, person1_.grade as grade2_0_, person1_.CUSTOMERNUMBE as CUSTOMER1_6_0_, person1_.clazz_ as clazz_0_, person2_.c as c0_1_, person2_.i as i0_1_, person2_.boeVersion as boeVersion0_1_, person2_.flags as flags0_1_, person2_.LASTUPDATEDATE as LASTUPDA5_0_1_, person2_.C_OSUSER_UPDATEDBY as C6_0_1_, person2_.I_OSUSER_UPDATEDBY as I7_0_1_, person2_.C_PERSON_BESTFRIEND as C25_0_1_, person2_.I_PERSON_BESTFRIEND as I26_0_1_, person2_.DATEOFBIRTH as DATEOFBI8_0_1_, person2_.firstName as firstName0_1_, person2_.C_ADDRESS_HOMEADDRESS as C23_0_1_, person2_.I_ADDRESS_HOMEADDRESS as I24_0_1_, person2_.insuranNo as insuranNo0_1_, person2_.insurance as insurance0_1_, person2_.lastName as lastName0_1_, person2_.pension as pension0_1_, person2_.secondTitle as secondT14_0_1_, person2_.sex as sex0_1_, person2_.C_PERSON_SPOUSE as C21_0_1_, person2_.I_PERSON_SPOUSE as I22_0_1_, person2_.taxArea as taxArea0_1_, person2_.taxCode as taxCode0_1_, person2_.title as title0_1_, person2_.WAGE_MONAMT as WAGE19_0_1_, person2_.WAGE_MONCUR as WAGE20_0_1_, person2_.clobAttr as clobAttr1_1_, person2_.C_COMPANY_EMPLOYEES as C8_1_1_, person2_.I_COMPANY_EMPLOYEES as I9_1_1_, person2_.EmployeeNumbe as Employee2_1_1_, person2_.rsi as rsi1_1_, person2_.SALARY_MONAMT as SALARY4_1_1_, person2_.SALARY_MONCUR as SALARY5_1_1_, person2_.C_EMPLOYE_TEAM as C6_1_1_, person2_.I_EMPLOYE_TEAM as I7_1_1_, person2_.email as email2_1_, person2_.grade as grade2_1_, person2_.CUSTOMERNUMBE as CUSTOMER1_6_1_, person2_.clazz_ as clazz_1_, address3_.c as c5_2_, address3_.i as i5_2_, address3_.boeVersion as boeVersion5_2_, address3_.flags as flags5_2_, address3_.LASTUPDATEDATE as LASTUPDA5_5_2_, address3_.C_OSUSER_UPDATEDBY as C6_5_2_, address3_.I_OSUSER_UPDATEDBY as I7_5_2_, address3_.city as city5_2_, address3_.country as country5_2_, address3_.postCode as postCode5_2_, address3_.street as street5_2_, company4_.c as c3_3_, company4_.i as i3_3_, company4_.boeVersion as boeVersion3_3_, company4_.flags as flags3_3_, company4_.LASTUPDATEDATE as LASTUPDA5_3_3_, company4_.C_OSUSER_UPDATEDBY as C6_3_3_, company4_.I_OSUSER_UPDATEDBY as I7_3_3_, company4_.C_ADDRESS_ADDRESS as C10_3_3_, company4_.I_ADDRESS_ADDRESS as I11_3_3_, company4_.name as name3_3_, company4_.registeredNum as register9_3_3_, person5_.c as c0_4_, person5_.i as i0_4_, person5_.boeVersion as boeVersion0_4_, person5_.flags as flags0_4_, person5_.LASTUPDATEDATE as LASTUPDA5_0_4_, person5_.C_OSUSER_UPDATEDBY as C6_0_4_, person5_.I_OSUSER_UPDATEDBY as I7_0_4_, person5_.C_PERSON_BESTFRIEND as C25_0_4_, person5_.I_PERSON_BESTFRIEND as I26_0_4_, person5_.DATEOFBIRTH as DATEOFBI8_0_4_, person5_.firstName as firstName0_4_, person5_.C_ADDRESS_HOMEADDRESS as C23_0_4_, person5_.I_ADDRESS_HOMEADDRESS as I24_0_4_, person5_.insuranNo as insuranNo0_4_, person5_.insurance as insurance0_4_, person5_.lastName as lastName0_4_, person5_.pension as pension0_4_, person5_.secondTitle as secondT14_0_4_, person5_.sex as sex0_4_, person5_.C_PERSON_SPOUSE as C21_0_4_, person5_.I_PERSON_SPOUSE as I22_0_4_, person5_.taxArea as taxArea0_4_, person5_.taxCode as taxCode0_4_, person5_.title as title0_4_, person5_.WAGE_MONAMT as WAGE19_0_4_, person5_.WAGE_MONCUR as WAGE20_0_4_, person5_.clobAttr as clobAttr1_4_, person5_.C_COMPANY_EMPLOYEES as C8_1_4_, person5_.I_COMPANY_EMPLOYEES as I9_1_4_, person5_.EmployeeNumbe as Employee2_1_4_, person5_.rsi as rsi1_4_, person5_.SALARY_MONAMT as SALARY4_1_4_, person5_.SALARY_MONCUR as SALARY5_1_4_, person5_.C_EMPLOYE_TEAM as C6_1_4_, person5_.I_EMPLOYE_TEAM as I7_1_4_, person5_.email as email2_4_, person5_.grade as grade2_4_, person5_.CUSTOMERNUMBE as CUSTOMER1_6_4_, person5_.clazz_ as clazz_4_, company6_.c as c3_5_, company6_.i as i3_5_, company6_.boeVersion as boeVersion3_5_, company6_.flags as flags3_5_, company6_.LASTUPDATEDATE as LASTUPDA5_3_5_, company6_.C_OSUSER_UPDATEDBY as C6_3_5_, company6_.I_OSUSER_UPDATEDBY as I7_3_5_, company6_.C_ADDRESS_ADDRESS as C10_3_5_, company6_.I_ADDRESS_ADDRESS as I11_3_5_, company6_.name as name3_5_, company6_.registeredNum as register9_3_5_, employee7_.c as c0_6_, employee7_.i as i0_6_, employee7_.boeVersion as boeVersion0_6_, employee7_.flags as flags0_6_, employee7_.LASTUPDATEDATE as LASTUPDA5_0_6_, employee7_.C_OSUSER_UPDATEDBY as C6_0_6_, employee7_.I_OSUSER_UPDATEDBY as I7_0_6_, employee7_.C_PERSON_BESTFRIEND as C25_0_6_, employee7_.I_PERSON_BESTFRIEND as I26_0_6_, employee7_.DATEOFBIRTH as DATEOFBI8_0_6_, employee7_.firstName as firstName0_6_, employee7_.C_ADDRESS_HOMEADDRESS as C23_0_6_, employee7_.I_ADDRESS_HOMEADDRESS as I24_0_6_, employee7_.insuranNo as insuranNo0_6_, employee7_.insurance as insurance0_6_, employee7_.lastName as lastName0_6_, employee7_.pension as pension0_6_, employee7_.secondTitle as secondT14_0_6_, employee7_.sex as sex0_6_, employee7_.C_PERSON_SPOUSE as C21_0_6_, employee7_.I_PERSON_SPOUSE as I22_0_6_, employee7_.taxArea as taxArea0_6_, employee7_.taxCode as taxCode0_6_, employee7_.title as title0_6_, employee7_.WAGE_MONAMT as WAGE19_0_6_, employee7_.WAGE_MONCUR as WAGE20_0_6_, employee7_.clobAttr as clobAttr1_6_, employee7_.C_COMPANY_EMPLOYEES as C8_1_6_, employee7_.I_COMPANY_EMPLOYEES as I9_1_6_, employee7_.EmployeeNumbe as Employee2_1_6_, employee7_.rsi as rsi1_6_, employee7_.SALARY_MONAMT as SALARY4_1_6_, employee7_.SALARY_MONCUR as SALARY5_1_6_, employee7_.C_EMPLOYE_TEAM as C6_1_6_, employee7_.I_EMPLOYE_TEAM as I7_1_6_, employee7_.email as email2_6_, employee7_.grade as grade2_6_, employee7_.clazz_ as clazz_6_, person8_.c as c0_7_, person8_.i as i0_7_, person8_.boeVersion as boeVersion0_7_, person8_.flags as flags0_7_, person8_.LASTUPDATEDATE as LASTUPDA5_0_7_, person8_.C_OSUSER_UPDATEDBY as C6_0_7_, person8_.I_OSUSER_UPDATEDBY as I7_0_7_, person8_.C_PERSON_BESTFRIEND as C25_0_7_, person8_.I_PERSON_BESTFRIEND as I26_0_7_, person8_.DATEOFBIRTH as DATEOFBI8_0_7_, person8_.firstName as firstName0_7_, person8_.C_ADDRESS_HOMEADDRESS as C23_0_7_, person8_.I_ADDRESS_HOMEADDRESS as I24_0_7_, person8_.insuranNo as insuranNo0_7_, person8_.insurance as insurance0_7_, person8_.lastName as lastName0_7_, person8_.pension as pension0_7_, person8_.secondTitle as secondT14_0_7_, person8_.sex as sex0_7_, person8_.C_PERSON_SPOUSE as C21_0_7_, person8_.I_PERSON_SPOUSE as I22_0_7_, person8_.taxArea as taxArea0_7_, person8_.taxCode as taxCode0_7_, person8_.title as title0_7_, person8_.WAGE_MONAMT as WAGE19_0_7_, person8_.WAGE_MONCUR as WAGE20_0_7_, person8_.clobAttr as clobAttr1_7_, person8_.C_COMPANY_EMPLOYEES as C8_1_7_, person8_.I_COMPANY_EMPLOYEES as I9_1_7_, person8_.EmployeeNumbe as Employee2_1_7_, person8_.rsi as rsi1_7_, person8_.SALARY_MONAMT as SALARY4_1_7_, person8_.SALARY_MONCUR as SALARY5_1_7_, person8_.C_EMPLOYE_TEAM as C6_1_7_, person8_.I_EMPLOYE_TEAM as I7_1_7_, person8_.email as email2_7_, person8_.grade as grade2_7_, person8_.CUSTOMERNUMBE as CUSTOMER1_6_7_, person8_.clazz_ as clazz_7_, address9_.c as c5_8_, address9_.i as i5_8_, address9_.boeVersion as boeVersion5_8_, address9_.flags as flags5_8_, address9_.LASTUPDATEDATE as LASTUPDA5_5_8_, address9_.C_OSUSER_UPDATEDBY as C6_5_8_, address9_.I_OSUSER_UPDATEDBY as I7_5_8_, address9_.city as city5_8_, address9_.country as country5_8_, address9_.postCode as postCode5_8_, address9_.street as street5_8_, person10_.c as c0_9_, person10_.i as i0_9_, person10_.boeVersion as boeVersion0_9_, person10_.flags as flags0_9_, person10_.LASTUPDATEDATE as LASTUPDA5_0_9_, person10_.C_OSUSER_UPDATEDBY as C6_0_9_, person10_.I_OSUSER_UPDATEDBY as I7_0_9_, person10_.C_PERSON_BESTFRIEND as C25_0_9_, person10_.I_PERSON_BESTFRIEND as I26_0_9_, person10_.DATEOFBIRTH as DATEOFBI8_0_9_, person10_.firstName as firstName0_9_, person10_.C_ADDRESS_HOMEADDRESS as C23_0_9_, person10_.I_ADDRESS_HOMEADDRESS as I24_0_9_, person10_.insuranNo as insuranNo0_9_, person10_.insurance as insurance0_9_, person10_.lastName as lastName0_9_, person10_.pension as pension0_9_, person10_.secondTitle as secondT14_0_9_, person10_.sex as sex0_9_, person10_.C_PERSON_SPOUSE as C21_0_9_, person10_.I_PERSON_SPOUSE as I22_0_9_, person10_.taxArea as taxArea0_9_, person10_.taxCode as taxCode0_9_, person10_.title as title0_9_, person10_.WAGE_MONAMT as WAGE19_0_9_, person10_.WAGE_MONCUR as WAGE20_0_9_, person10_.clobAttr as clobAttr1_9_, person10_.C_COMPANY_EMPLOYEES as C8_1_9_, person10_.I_COMPANY_EMPLOYEES as I9_1_9_, person10_.EmployeeNumbe as Employee2_1_9_, person10_.rsi as rsi1_9_, person10_.SALARY_MONAMT as SALARY4_1_9_, person10_.SALARY_MONCUR as SALARY5_1_9_, person10_.C_EMPLOYE_TEAM as C6_1_9_, person10_.I_EMPLOYE_TEAM as I7_1_9_, person10_.email as email2_9_, person10_.grade as grade2_9_, person10_.CUSTOMERNUMBE as CUSTOMER1_6_9_, person10_.clazz_ as clazz_9_, company11_.c as c3_10_, company11_.i as i3_10_, company11_.boeVersion as boeVersion3_10_, company11_.flags as flags3_10_, company11_.LASTUPDATEDATE as LASTUPDA5_3_10_, company11_.C_OSUSER_UPDATEDBY as C6_3_10_, company11_.I_OSUSER_UPDATEDBY as I7_3_10_, company11_.C_ADDRESS_ADDRESS as C10_3_10_, company11_.I_ADDRESS_ADDRESS as I11_3_10_, company11_.name as name3_10_, company11_.registeredNum as register9_3_10_, employee12_.c as c0_11_, employee12_.i as i0_11_, employee12_.boeVersion as boeVersion0_11_, employee12_.flags as flags0_11_, employee12_.LASTUPDATEDATE as LASTUPDA5_0_11_, employee12_.C_OSUSER_UPDATEDBY as C6_0_11_, employee12_.I_OSUSER_UPDATEDBY as I7_0_11_, employee12_.C_PERSON_BESTFRIEND as C25_0_11_, employee12_.I_PERSON_BESTFRIEND as I26_0_11_, employee12_.DATEOFBIRTH as DATEOFBI8_0_11_, employee12_.firstName as firstName0_11_, employee12_.C_ADDRESS_HOMEADDRESS as C23_0_11_, employee12_.I_ADDRESS_HOMEADDRESS as I24_0_11_, employee12_.insuranNo as insuranNo0_11_, employee12_.insurance as insurance0_11_, employee12_.lastName as lastName0_11_, employee12_.pension as pension0_11_, employee12_.secondTitle as secondT14_0_11_, employee12_.sex as sex0_11_, employee12_.C_PERSON_SPOUSE as C21_0_11_, employee12_.I_PERSON_SPOUSE as I22_0_11_, employee12_.taxArea as taxArea0_11_, employee12_.taxCode as taxCode0_11_, employee12_.title as title0_11_, employee12_.WAGE_MONAMT as WAGE19_0_11_, employee12_.WAGE_MONCUR as WAGE20_0_11_, employee12_.clobAttr as clobAttr1_11_, employee12_.C_COMPANY_EMPLOYEES as C8_1_11_, employee12_.I_COMPANY_EMPLOYEES as I9_1_11_, employee12_.EmployeeNumbe as Employee2_1_11_, employee12_.rsi as rsi1_11_, employee12_.SALARY_MONAMT as SALARY4_1_11_, employee12_.SALARY_MONCUR as SALARY5_1_11_, employee12_.C_EMPLOYE_TEAM as C6_1_11_, employee12_.I_EMPLOYE_TEAM as I7_1_11_, employee12_.email as email2_11_, employee12_.grade as grade2_11_, employee12_.clazz_ as clazz_11_ from RPERSONPERSONFAMILY family0_ left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person1_ on family0_.C_TO=person1_.c and family0_.I_TO=person1_.i left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person2_ on person1_.C_PERSON_BESTFRIEND=person2_.c and person1_.I_PERSON_BESTFRIEND=person2_.i left outer join TAddress address3_ on person2_.C_ADDRESS_HOMEADDRESS=address3_.c and person2_.I_ADDRESS_HOMEADDRESS=address3_.i left outer join TCompany company4_ on address3_.c=company4_.C_ADDRESS_ADDRESS and address3_.i=company4_.I_ADDRESS_ADDRESS left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person5_ on person2_.C_PERSON_SPOUSE=person5_.c and person2_.I_PERSON_SPOUSE=person5_.i left outer join TCompany company6_ on person5_.C_COMPANY_EMPLOYEES=company6_.c and person5_.I_COMPANY_EMPLOYEES=company6_.i left outer join ( select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic ) employee7_ on person5_.C_EMPLOYE_TEAM=employee7_.c and person5_.I_EMPLOYE_TEAM=employee7_.i left outer join ( select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 0 as clazz_ from TPerson union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, grade, I_WKORDER_WORKERS, SALARY_MONAMT, sex, C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, email, WAGE_MONCUR, pension, 2 as clazz_ from TMechanic union all select C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, rsi, null as grade, null as I_WKORDER_WORKERS, SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, SALARY_MONCUR, i, I_COMPANY_EMPLOYEES, C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, null as CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 1 as clazz_ from TEmployee union all select null as C_COMPANY_EMPLOYEES, insuranNo, title, c, taxArea, null as rsi, null as grade, null as I_WKORDER_WORKERS, null as SALARY_MONAMT, sex, null as C_WKORDER_WORKERS, null as SALARY_MONCUR, i, null as I_COMPANY_EMPLOYEES, null as C_EMPLOYE_TEAM, flags, I_PERSON_SPOUSE, CUSTOMERNUMBE, insurance, C_PERSON_SPOUSE, C_ADDRESS_HOMEADDRESS, I_PERSON_BESTFRIEND, secondTitle, null as EmployeeNumbe, I_ADDRESS_HOMEADDRESS, WAGE_MONAMT, C_PERSON_BESTFRIEND, lastName, null as I_EMPLOYE_TEAM, boeVersion, LASTUPDATEDATE, firstName, I_OSUSER_UPDATEDBY, C_OSUSER_UPDATEDBY, taxCode, null as clobAttr, DATEOFBIRTH, null as email, WAGE_MONCUR, pension, 3 as clazz_ from TCustomer ) person8_ on employee7_.C_PERSON_BESTFRIEND=person8_.c and employee7_.I_PERSON_BESTFRIEND=person8_.i left outer join TAddress address9_ on employee7_.C_ADDRESS_HOMEADD