ActiveRecord custom insert/update query

2009-11-02 Thread Michał Staszewski
I'm using PostGis to store some spatial data. I used ActiveRecord to retrive data from db, and I used mapping similar to this: [ActiveRecord (Table = drawings )] public class DrawingAR { [PrimaryKey (Generator = PrimaryKeyType.Sequence, SequenceName = id_seq)] public int ID

Re: PostgreSQL integer[] problem

2009-04-01 Thread Michał Staszewski
Mauricio Scheffer pisze: See http://nhforge.org/wikis/howtonh/use-postgresql-arrays-with-nhibernate.aspx On Mar 30, 5:43 pm, Michał Staszewski mailing...@gmail.com wrote: Hi! I have table in PostgreSQL, which has column of integer[] type; I mapped as following: [Property(array)] int

PostgreSQL integer[] problem

2009-03-30 Thread Michał Staszewski
Hi! I have table in PostgreSQL, which has column of integer[] type; I mapped as following: [Property(array)] int[] Arrayy {get; set; } However, during trying to fetch any data from tha type i get excpetion: {Could not cast the value in field array3_17_0_ of type Int32[] to the Type

Re: AR Native Query - type not initialized

2009-02-12 Thread Michał Staszewski
Ken Egozi pisze: The exception is quite informative. You need to specify the return types for the query, as you are not returning any NH object so NH does not now how to read the IDataReader. Now it's informative (earlier wasn't ;) ) Before I looked for sth with SetReturnType or similar. I

Re: AR Native Query - type not initialized

2009-02-11 Thread Michał Staszewski
Tyler Burd wrote: I ran into this issue not long ago. The generic type parameter on SimpleQuery MUST be an Active Record persistent class. You can't use SimpleQuery to get DTOs or integer results. If you go to a lower level and use the good ol' session.CreateQuery or