Hi All,

I need to delete a bunch of objects that belong to a set.  In my case
these objects have primay key of type Int64.  I have an array if Int64
containing the keys of objects that I need to delete.  What would be
the best way of deleting them.

Ideally, I would be able to write a query like this:  (Ignoring
transactions)

Int64[] keys = ...;  // an array of primary keys.

string queryStr = "delete from MyEntity wher MyKey in :keys";
IQuery query = Session.CreateQuery(queryStr);
query.ExecuteUpdate();

Is this the correct way to delete objects from a set?

Any help would be appreciated.

--

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