I am using access="noop" to try and create a query-only set, like
this:
<set access="noop" name="Bars"
table="FooBarManyToManyRelationshipTable">
<key column="FooId" />
<many-to-many class="MyProject.Bar">
<column name="BarId" />
</many-to-many>
</set>
This works fine for a query like the following:
Session.CreateCriteria<Foo>("f")
.CreateAlias("f.Bars", "b", JoinType.InnerJoin)
.Add(Restrictions.Eq("b.Name", "test"))
.SetResultTransformer(new
DistinctRootEntityResultTransformer())
.List<Foo>();
The problem is that after this query is finished and the transaction
is commited, a delete statement is executed to the database:
DELETE FROM FooBarManyToManyRelationshipTable WHERE FooId =
'xxxxxx'
Why is this happening?
I have tried setting cascade to none and even cache to readOnly but it
still occurs.
--
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.