Dear all,

I setup a small web application to test nHibernate with mono and
postgresql.

I'm facing a problem I can't find a solution. Nhibernate throws an
"ArgumentException" with message "failed to convert parameters".

Here is the stack trace:

System.ArgumentException: failed to convert parameters
  at System.Reflection.MonoMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x00000] in <filename unknown>:0
  at System.Reflection.MonoProperty.SetValue (System.Object obj,
System.Object value, BindingFlags invokeAttr, System.Reflection.Binder
binder, System.Object[] index, System.Globalization.CultureInfo
culture) [0x00000] in <filename unknown>:0
  at System.Reflection.PropertyInfo.SetValue (System.Object obj,
System.Object value, System.Object[] index) [0x00000] in <filename
unknown>:0
  at NHibernate.Properties.BasicPropertyAccessor+BasicSetter.Set
(System.Object target, System.Object value) [0x00000] in <filename
unknown>:0

My project is a very simple ASP.NET MVC. The error shows up when I do
session.save:

Product p = new Product { Name = "Cool", Id = 0 };
session.Save(p);
tx.Commit();

Product is defined as:

public class Product
{
        public virtual int Id { get ; set ; }
        public virtual string Name { get ; set ; }
}

With the mapping

<class name="Product">
  <id name="Id">
    <generator class="counter" />
  </id>
  <property name="Name" />
</class>

The table is correctly created.

create table Product (
  Id int4 not null,
  Name varchar(255),
  primary key (Id)
)

Thanks in advance for your help !

Antoine

-- 
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