I am Puneet Behl working as Associate Technical Lead at TO THE NEW in Technology division. Please go through my blog posts below
In my recent project there was a use case to change repeat interval of job so that job runs after every 8 seconds instead of 1 second. [java] class TestJob { def concurrent = false static triggers = { simple repeatInterval: 1000l // execute job once in 1 sec } def execute() { println...
When using criteria queries, many times we encounter a use case where we need to order our result not on any field of domain class but on our result set, in these cases aliases can be used. In my project, use case was to find most liked products from the domain: [java] ProductStat{ Date dateCreated Product product } [/java] ...
All communication between Hibernate and the database runs within the context of a database transaction but the Session itself is lazy in that it only ever initiates a database transaction at the last possible moment.Given that there is a transaction, you would think that if something went wrong, any problems would be rolled back. However,...