Hi,
My problem is that dml-style operations (as described here:
http://docs.jboss.org/hibernate/stable/ ... irect.html) only work if the from-clause names an entity.
I would like to manipulate the contents of the collections for an entity.
My entity is a class DemoPerson which has an collection named tags - this collection is mapped into the database-table demo_person_tags.
( NFO: Mapping collection: org.osbl.search.demodata.model.DemoPerson.tags -> demo_person_tags )
From this table i would (for example) like to remove lines.
Is this possible using DML-style HQL or do I have to use native sql queries to manipulate this data?
I tried some more and I will have to use native SQL - which brings me to a quick follow-up question:
createSQLQuery("FROM ??? DELETE WHERE id = 69").executeUpdate();
What is the correct way to get demo_person_tags to where the questionmarks are in the native sql query?
(I could just write it in there, but then the code would have to change if the mapping changes - that's not cool :) ).
Thank you in advance and for your time.