I added some code to capture the # of rows in the DB before and after the delete...9 out of 10 times this "delete" works correctly...However, as you see in this sample the row count is the same..
After the code is the SQL trace associated with this section...I have color code the relevant SQL...
I assume that I haven't cleaned up some references properly but I haven't the foggiest idea where [or how] to look...You assistance is greatly appreciated...
Code:
List list = merchantAttributeDAO.list();
System.out.print("PRE DELETE: SIZE OF LIST ");
System.out.println(list.size());
list = null;
merchantAttributeDAO.delete(this.merchantAttributeDTO);
}
}
}
TransactionBO.commitTransaction();
TransactionBO.beginTransaction();
List list = merchantAttributeDAO.list();
System.out.print("AFTER DELETE: SIZE OF LIST ");
System.out.println(list.size());
list = null;
TransactionBO.commitTransaction();
SQL:
Hibernate: select merchantat0_.UID_PK as UID_PK, merchantat0_.merchantCategoryTreeUID as merchant2_, merchantat0_.attributeUID as attribut3_ from tmerchantattributes merchantat0_
PRE DELETE: SIZE OF LIST 5
Hibernate: delete from tmerchantattributes where UID_PK=?
Hibernate: select merchantat0_.UID_PK as UID_PK, merchantat0_.merchantCategoryTreeUID as merchant2_, merchantat0_.attributeUID as attribut3_ from tmerchantattributes merchantat0_
Hibernate: select objectattr0_.categoryUID as category6___, objectattr0_.UID_PK as UID_PK__, objectattr0_.UID_PK as UID_PK4_, objectattr0_.value as value4_, objectattr0_.currency as currency4_, objectattr0_.language as language4_, objectattr0_.country as country4_, objectattr0_.categoryUID as category6_4_, objectattr0_.attributeUID as attribut7_4_, attributed1_.UID_PK as UID_PK0_, attributed1_.attributeKey as attribut2_0_, attributed1_.name as name0_, attributed1_.deleted as deleted0_, attributed1_.pickListValue as pickList5_0_, attributed1_.required as required0_, attributed1_.visibility as visibility0_, attributed1_.readOnly as readOnly0_, attributed1_.validationPattern as validati9_0_, attributed1_.defaultValue as default10_0_, attributed1_.systemUsage as systemU11_0_, attributed1_.system1 as system10_, attributed1_.system2 as system20_, attributed1_.system3 as system30_, attributed1_.system4 as system40_, attributed1_.system5 as system50_, attributed1_.customer1 as customer10_, attributed1_.customer2 as customer20_, attributed1_.customer3 as customer30_, attributed1_.customer4 as customer40_, attributed1_.customer5 as customer50_, attributed1_.ordering as ordering0_, attributed1_.attributeTypeUID as attribu23_0_, attributed1_.attributeGroupUID as attribu24_0_, attributed1_.attributeDependencyUID as attribu25_0_, attributet2_.UID_PK as UID_PK1_, attributet2_.name as name1_, attributet2_.EPKey as EPKey1_, attributet2_.description as descript4_1_, attributeg3_.UID_PK as UID_PK2_, attributeg3_.name as name2_, attributeg3_.deleted as deleted2_, attributeg3_.type as type2_, attributed4_.UID_PK as UID_PK3_, attributed4_.name as name3_, attributed4_.description as descript3_3_ from tCategoryAttribute objectattr0_ left outer join tAttribute attributed1_ on objectattr0_.attributeUID=attributed1_.UID_PK left outer join tAttributeType attributet2_ on attributed1_.attributeTypeUID=attributet2_.UID_PK left outer join tAttributeGroup attributeg3_ on attributed1_.attributeGroupUID=attributeg3_.UID_PK left outer join tAttributeDependency attributed4_ on attributed1_.attributeDependencyUID=attributed4_.UID_PK where objectattr0_.categoryUID=?
Hibernate: select objectattr0_.manufacturerUID as manufact6___, objectattr0_.UID_PK as UID_PK__, objectattr0_.UID_PK as UID_PK4_, objectattr0_.value as value4_, objectattr0_.currency as currency4_, objectattr0_.language as language4_, objectattr0_.country as country4_, objectattr0_.manufacturerUID as manufact6_4_, objectattr0_.attributeUID as attribut7_4_, attributed1_.UID_PK as UID_PK0_, attributed1_.attributeKey as attribut2_0_, attributed1_.name as name0_, attributed1_.deleted as deleted0_, attributed1_.pickListValue as pickList5_0_, attributed1_.required as required0_, attributed1_.visibility as visibility0_, attributed1_.readOnly as readOnly0_, attributed1_.validationPattern as validati9_0_, attributed1_.defaultValue as default10_0_, attributed1_.systemUsage as systemU11_0_, attributed1_.system1 as system10_, attributed1_.system2 as system20_, attributed1_.system3 as system30_, attributed1_.system4 as system40_, attributed1_.system5 as system50_, attributed1_.customer1 as customer10_, attributed1_.customer2 as customer20_, attributed1_.customer3 as customer30_, attributed1_.customer4 as customer40_, attributed1_.customer5 as customer50_, attributed1_.ordering as ordering0_, attributed1_.attributeTypeUID as attribu23_0_, attributed1_.attributeGroupUID as attribu24_0_, attributed1_.attributeDependencyUID as attribu25_0_, attributet2_.UID_PK as UID_PK1_, attributet2_.name as name1_, attributet2_.EPKey as EPKey1_, attributet2_.description as descript4_1_, attributeg3_.UID_PK as UID_PK2_, attributeg3_.name as name2_, attributeg3_.deleted as deleted2_, attributeg3_.type as type2_, attributed4_.UID_PK as UID_PK3_, attributed4_.name as name3_, attributed4_.description as descript3_3_ from tManufacturerAttribute objectattr0_ left outer join tAttribute attributed1_ on objectattr0_.attributeUID=attributed1_.UID_PK left outer join tAttributeType attributet2_ on attributed1_.attributeTypeUID=attributet2_.UID_PK left outer join tAttributeGroup attributeg3_ on attributed1_.attributeGroupUID=attributeg3_.UID_PK left outer join tAttributeDependency attributed4_ on attributed1_.attributeDependencyUID=attributed4_.UID_PK where objectattr0_.manufacturerUID=?
AFTER DELETE: SIZE OF LIST 5