Questions tagged as 'nhibernate'

2
answers

Is there any non-HQL way to bulk update with NHibernate?

I'm having a routine that will set a flag in several records that meet certain requirements, and I'd like to keep that in control of NHibernate . However, I have not found any way to do a bulk update (update batch), with the FluentNHibern...
asked by 20.05.2014 / 21:48
1
answer

How to map a read-only property in Fluent nhibernate, error in identifying setter

I have a property that should be read-only, I performed mapping via code and assign the parameter to read-only, however, it gives me an exception stating that the property setter was not found Exit: "Could not find a setter for property 'I...
asked by 20.04.2015 / 22:04
2
answers

Error NHibernate System.InvalidCastException - ManyToOneType to ComponentType

Exception:    System.InvalidCastException: Can not convert an object of type 'NHibernate.Type.ManyToOneType' to type 'NHibernate.Type.ComponentType'. The classes involved are: public class ClassePrincipal { public virtual long Codi...
asked by 16.09.2015 / 14:50
0
answers

Using JOIN with HQL function in NHibernate?

I'm trying to run a JOIN using HQL with NHibernate and returns an empty list. How to do this? I'm trying like this. [Serializable] public class Cliente { public virtual int id { set; get; } public virtual string nome...
asked by 21.09.2016 / 22:03
2
answers

How to use the SUM aggregation function in a NHIBERNATE query?

My query consists of knowing NumCarroId , TotalGasto and VlrUnit , in Sql I could do this but when I play in HQL it returns the following error: Applying GROUP BY to SUM to make a ToList, to show...
asked by 17.01.2018 / 17:25
1
answer

Attempt to read or write to protected memory

I have an application in C# that connects to the Oracle database. For this the application makes use of NHibernate (a very old version) and Castle ActiveRecord . This has always worked, but now when I try to query the database I...
asked by 27.03.2015 / 12:48
2
answers

Apply between a hql in c #

I'm trying to apply an between with two fields of a part of my form, are dates and ids of vehicles, I'm not very aware of how it models this by HQL in nhibernate with C #, I wanted to know what it would be like to apply this to hql. Normally m...
asked by 19.12.2017 / 16:24
1
answer

Using oid column in PostgreSQL as primary key is correct?

PostgreSQL creates by default the OIDs (object identifiers) column, you can get it done. select oid, * from table I have a table that has no primary key, and I want to map it in Fluent nHibernate (C #). Is it better to use oid as...
asked by 18.11.2016 / 12:58
1
answer

Write file to database with NHibernate

Is it possible to serialize and write database files with NHibernate? public virtual File Arquivo { get; set; } It does not let you map and did not want to write without using NHibernate to follow the pattern     
asked by 06.12.2016 / 13:41
1
answer

Fluent NHibernate - Key Mapping Compound

Greetings, I'm having a hard time and I can not solve it. I have an application where I created the mapping and everything was working perfectly, but now I need to change it and that's where the problem comes up: I used NHibernate Fluen...
asked by 05.02.2016 / 20:32