criteria « Update « JPA Q&A





1. How can you remove a criterion from criteria?    stackoverflow.com

For instance if I do something like:

Criteria c = session.createCriteria(Book.class)
             .add(Expression.ge("release",reDate);
         ...

2. Hibernate: UPDATE with a user-provided SQL code    stackoverflow.com

I've been reading the documentation, but I couldn't find any information about it. Is it possible to have Hibernate send user-provided SQL queries in order to UPDATE or to INSERT an object ...

3. How do I write a Hibernate Criteria to match case-insensitively and trim whitespace?    stackoverflow.com

I currently have a restriction on a criteria of MyClass to match values of MyClass.propertyName:

Restrictions.ilike("propertyName", matchString)
Is it possible for this to match values of MyClass.propertyName with leading or trailing whitespace?
Here is ...

4. remove accents criteria    forum.hibernate.org

5. Simple Update by Criteria???    forum.hibernate.org

Hey folks, A simple question. (And yes i searched the forum, but i was not very successful) Is it possible to make a simple update by criteria??? Everything else works fine! So the problem is maybe just the understanding! I mean, what if i just want to do smth. like this: UPDATE users SET locked = true, reason = '' WHERE ...

6. Bulk updates through Criteria interface    forum.hibernate.org

I would like to ask if someone considered the possibility to add some "bulk update" feature in hibernate. I mean if I would like to assign a lot of instances of some class the same value of one property I have to load them all from DB, change them one-by-one a also save them one-by-one. I think there should be more ...

7. merging criteria    forum.hibernate.org

8. Persisting a Criteria    forum.hibernate.org

9. Update with the Criteria API    forum.hibernate.org

We have an app in which we need to lock a set of rows in the database and then perform a look up. I'm aware of using an update sql statement to do this but I was looking for an object oriented way of performing the same and like if I need to do something like update set lockId=2 where ...





10. Update data using criteria    forum.hibernate.org

I have a search criteria, i want to change a value in all the objects returned from the criteria SQL: UPDATE set val='new' where "dynamic search criteria' Is there any way to do it using Criteria API ? If not i have some workaround: I getting all the ids of the objects that need to be changed using the criteria : ...

11. Criteria based Updates?    forum.hibernate.org

Hi, I'd like some advice on designing a solution to a problem that I'm facing: I'm displaying data to the user and allowing them to filter it using Hibernate Criteria. The data set is very large so can't be loaded into memory, I'm paging the data. I have a requirement to allow all of the filtered data to be updated. Just ...