I faced with this exception in my big solution, but I localized the
problem to small project:
I have an A class which has composite key with specific type.
Then I try to make custom update which looks like:
ISession session = sessionFactory.OpenSession();
session.CreateQuery("update A a set a.Data = :data
where a.Id = :id").SetString("data", "some data").
SetParameter("id", new AId(1, 1)).
ExecuteUpdate();
ExecuteUpdate leads me to exception: "SqlNode's text did not reference
expected number of columns".
Mappings:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Main"
assembly="Main">
<class name="A" table="A">
<composite-id name="Id" class="AId">
<key-property name="Id" column="Id" />
<key-property name="SecondId" column="SecondId" />
</composite-id>
<property name="Data" />
</class>
</hibernate-mapping>
Classes are very simple, I hope it is not requred to reproduce the
problem...
--
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.