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
JPA Criteria Api not generating correct sql
There is a segment of my criteria query, which i hope to generate a sql segement as substring(manifest_url, instr(manifest_url, '?') - 14, 10)
why this code return me null if id specific entry available in database
public Contact getContactById(int id) {