nh 2.1.2.4000
antlr3.runtime 3.1.0.39271

  <subclass discriminator-value="2" name="DeployStatus"
extends="Status">
    <property... />
    <set name="assignedTo" access="field" batch-size="50"
cascade="all" table="StatusAssignee" lazy="extra">
      <key foreign-key="StatusAssignee_StatusAssignee_fk">
        <column name="Status" not-null="true" unique-
key="StatusAssignee_Assignee_un" />
      </key>
      <element not-null="true" length="50">
        <column name="Name" unique-key="StatusAssignee_Assignee_un" />
      </element>
    </set>
  </subclass>

currently I'm preforming the following operation
session
.CreateSQLQuery("update StatusAssignee set Name = :newValue where Name
in (:oldValues)")
.SetParameterList("oldValues", command.OldValues)
.SetParameter("newValue", command.NewValue)
.ExecuteUpdate();

which is a sql query, I would like to use HQL to conform with the rest
of the operations I'm preforming.
I have tried the following queries without success. Antlr is returning
exceptions stating the queries are bad.
update Status set assignedTo = :newValue where assignedTo in
(:oldValues)
update Status set elements(assignedTo) = :newValue where
elements(assignedTo) in (:oldValues)
update Status set elements(assignedTo) = :newValue where assignedTo in
(:oldValues)
update Status set assignedTo = :newValue where elements(assignedTo)
exists (:oldValues)
.... you get the idea.

is it possible to preform a HQL update on a component collection? if
so what would the hql look like?

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to