I am using Hibernate 3.2.3GA and I am trying to run the following HQL query (code):
Code:
List<PersonImpl> enabledPersons = new ArrayList<PersonImpl>();
...
Query q = QueryUtil.createHQLQuery("update PersonImpl p set disabled = true where externalDirectory = :ed and p not in (:enabledPersons)")
.setEntity("ed", edi)
.setParameterList("enabledPersons", enabledPersons);
List result = q.list();
While running this code I get exception:
Code:
Not supported for DML operations [update com.smthg.model.organization.PersonImpl p set disabled = true where externalDirectory = :ed and p not in (:enabledPersons0_, :enabledPersons1_)]
I am trying to "disable" PersonImpl objects which are not in enabledPersons List.
I am confused by the message in the exception: is this functionality not supported or am I doing something wrong?