persistence@glassfish.java.net

Re: Code review for issue 1324: toplink.refresh query hint does not cascade

From: Christopher Delahunt <christopher.delahunt_at_oracle.com>
Date: Wed, 20 Jun 2007 14:11:46 -0400

Hello Wonseok,

My concern is that by setting the cascadeByMapping option with the hint, it will override any settings users might have set manually (through customizers or direct toplink apis) on the query still wishing to set the query to refresh dynamically. It might be better to always have the JPQL queries use the cascadeByMapping in the create or buildEJBQLDatabaseQuery method, as this will ensure that all refresh queries use this option unless a user specifically changes it.

Best Regards,
Chris


  ----- Original Message -----
  From: Wonseok Kim
  To: persistence_at_glassfish.dev.java.net
  Sent: Wednesday, June 20, 2007 11:15 AM
  Subject: Code review for issue 1324: toplink.refresh query hint does not cascade


  Hi Tom, Chris

  I'm fixing the following issue. Please review the attached fix and let me know if you have any concern.
  https://glassfish.dev.java.net/issues/show_bug.cgi?id=1324

  I confirmed cascade refresh works as expected in my manual local test(modified data manually between transactions and confirmed the result of the query with refresh hint).
  Also, I added some assertion code in entity-persistence-tests to check the DatabaseQuery's cascade policy.

  Thanks,
  Wonseok