Questions tagged as 'fluent-nhibernate'

0
answers

NHibernate INNER JOIN FETCH is not populating properties

I have the following query in HQL: select photoRating from PhotoRating as photoRating inner join fetch photoRating.FormularioRespostaDoUsuario as form inner join fetch form.Trecho as section And whenever I run it using the...
asked by 11.04.2016 / 16:57
1
answer

doubts when doing nhibernate mapping

I have the following scenario: public class ExemploDTO { public virtual int Id { get; set; } public virtual List<PessoaDTO> Cliente { get; set; } public virtual ServicoDTO Servico { get; set; } } How would map this class u...
asked by 18.02.2015 / 19:33
1
answer

Fluid mapping composite nhibernate key with firebird bank

I am having difficulty in composing primary key mapping using fluent nhibernate. I have the following class: public class NotaItem { public NotaItem(){} public virtual int Id { get; set; } //chave primaria public virtual Int16 Nu...
asked by 02.02.2016 / 18:15
1
answer

Problem retrieving References from a query in Nhibernate HasMany

I'm using Nhibernate with WebAPI I have 2 entities Profile and personLogin Personalogin may have N Profile and Profile 1 Person Login. However, when I go to the webservice PessoaLogin, the Profile reference only works if it is NULL if I add a Pr...
asked by 18.12.2014 / 18:21
1
answer

Error returning data using Fluent NHibernate (Many to Many)

I have a many-to-many relationship (M: M) using Fluent NHibernate: Class / Map - Drive: public class Unidade { public virtual int Id { get; set; } public virtual string Descricao { get; set; } public virtual IList<Unidade...
asked by 08.08.2014 / 15:32
1
answer

How to change the name of the References column by Fluent Nhibernate?

In the "LOG" class, I'm trying to indicate the column name, which is an FK, using FluentNHibernate's References. I have the following class structure: public class Pessoa { public virtual int Id { get; set; } public virtual string Nom...
asked by 28.07.2014 / 16:02
1
answer

Dependency injection with Ninject

I'm using Ninject in ASP.Net MVC and trying to implement, but I'm getting an error:    Error activating ISessionFactory       No matching bindings are available, and the type is not self-bindable.       Activation path:       3) Injection...
asked by 09.09.2014 / 02:20
1
answer

Using elements like "Not Exists" and Sub Query in LINQ, LAMBDA EXPRESSION and Nhibernate

Good morning, I have a query to run in my database, but here in our projects we use Nhibernate as an ORM tool. I'm having difficulty passing this SQL query to a syntax used with NHibernate. The query is down: SELECT distinct a.NumContrO...
asked by 06.09.2018 / 14:09
0
answers

Map Multiple Databases with FluentNhibernate

I'm having trouble mapping multiple databases with FluentNhibernate. I used the following methodology (remembering that the databases are different). I created 3 FluentSessionFactory for each bank with its particular connection. Later I...
asked by 03.07.2018 / 19:36
0
answers

NHibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing. Type:

I'm having this problem, does anyone know how I can fix this problem? This is my Nhibernate config code. public class NhibernateHelper { private ISessionFactory sessionFactory; public static ISession GetSession() { re...
asked by 03.04.2018 / 15:39