Relative Content

Tag Archive for springhibernatejpa

query hibernate take elements same value with same heap address location

“from DiscountCode c join fetch c.priceRule left join fetch c.priceRule.resourcePublications where c.storeId = :storeId and c.code in (:codes)” in this query, i have the two seperate discount but those discount codes have the same pricerule, so when i execute query then i received list of 2 element of discount code, but because they have the same price_rule so these price_rules have the same address location in heap memory, when i change the value of a price_rule then this action is also effect to the price_rule of the other discount code, i don’t want it happen, how can i handle it

query hibernate take elements same value with same heap address location

“from DiscountCode c join fetch c.priceRule left join fetch c.priceRule.resourcePublications where c.storeId = :storeId and c.code in (:codes)” in this query, i have the two seperate discount but those discount codes have the same pricerule, so when i execute query then i received list of 2 element of discount code, but because they have the same price_rule so these price_rules have the same address location in heap memory, when i change the value of a price_rule then this action is also effect to the price_rule of the other discount code, i don’t want it happen, how can i handle it