Questions tagged as 'fluent-nhibernate'

2
answers

How to save a cascaded collection in nhibernate without putting circular reference?

Always when I try to save an object with a collection of data mapped as HasMany I have to put a circular reference so that NHibernate can save this object cascade. For example I have the following mapping of the parent class. public...
asked by 12.12.2013 / 20:49
1
answer

Fluent NHibernate - key mapping composed one to many

I'm having a problem mapping an entity to Fluent NHibernate . I have a 1-N relationship with the two tables in the bank having composite keys. When I try to list my User entity it returns an error, but this happens only when I create th...
asked by 20.05.2016 / 18:37
1
answer

Sort 2 columns at once - Asp Mvc + FluentNhibernate

Good morning! I would like to know how to sort two columns at a time in a query so that it is, in my case, 1st in descending order of date but in alphabetical order. public IList<Analise> ListaTodosOrdenado() { usi...
asked by 11.10.2016 / 17:23
2
answers

How to use fluent nhibernate properly?

One problem I have encountered due to inexperience with this kind of tool is how to use lazy load without interfering with the software architecture. I use the following architecture: IHM (Human Machine Interface): It has all the forms a...
asked by 24.06.2014 / 21:01
1
answer

c # Nhibernate a different object with the same identifier value was already associated with the session

I'm at a time with this error and can not find a good solution. The recording of the objects works normally, however for changes it returns me this message:    Additional information: a different object with the same identifier   value was...
asked by 16.12.2016 / 18:07
2
answers

Claims Identity MVC

I'm having a hard time implementing Claims to perform user authorizations in my project, I've read a lot but can not execute. I'm using the NHibernate.AspNet.Identity for this reason I can not run as in forums and tutorials read, but I'm n...
asked by 06.07.2017 / 05:08
1
answer

Fluent NHibernate with multiple tables

I'm using Fluent NHibernate to help with ORM (replacing .hbm files manually) with a single class: User Class: public class Usuario { public virtual int Id { get; set; } public virtual string Nome { get; set; } pu...
asked by 23.12.2015 / 14:54
1
answer

Map a field of type CHAR in the database to a field of type bool in C #, with FluentNHibernate?

In the database I have a ATIVO field of type CHAR(1) , where 'T' = true and 'F' = false . Now, in my application I'm getting around this problem with a "gambiarra", where I mapped my Ativo attribute to string...
asked by 02.04.2014 / 19:55
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

Receive by Parameter and Manipulate a Generic Object LIST

I need to get a Generic Object List parameter and manipulate it, although I do not understand how to do it. Example: public class Funcionario { public long Id {get; set;} public string Nome {get; set;} public DateTime DataCont...
asked by 20.01.2017 / 23:25