Questions tagged as 'fluent-nhibernate'

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

Error returning list with Fluent NHibernate

Within the Web.API project, I've created a Get () method which returns a list of objects - IList. This PersonAcess class has a Log list (1: N). When you execute the Get () method, an exception occurs: <ExceptionType>System.InvalidOper...
asked by 31.07.2014 / 14:20
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

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

How to create a query with union using NHibernate

I need to implement a query in nhibernate to do a union between 2 tables. In sql , it would look something like this: SELECT T1.Id AS ID FROM TABELA1 AS T1 UNION SELECT T2.Id AS ID FROM TABELA2 AS T2 I did not find any...
asked by 03.04.2014 / 19:42
1
answer

Is there any way to set NHibernate to not parameterize a query?

Problem I have a Linq query with NHibernate in which I need to concatenate the results with a separator to compare it with those of the% main_coq, is something similar to the one shown below: IQueryable<string> queryList = (from t1...
asked by 03.09.2014 / 15:04
1
answer

Attempting to update with NHibernate?

I'm trying to make an update with NHibernate but it always returns me an error saying that there are two open sessions: illegally attempted to associate a proxy with two open session How to solve this? GenericDAO public class Ge...
asked by 10.03.2016 / 23:17
1
answer

Query with query using LINQ and NHibernate

I need help with a query that you should look for:    PK_PARENT, PAPER_NAME, {FILE_NAME, FILE_NAME2, ..., FILE_NAME *} For the search I've tried to search some ways like: var listaPai = (from parent in session.Query<Parent>() sele...
asked by 24.09.2015 / 21:18
2
answers

Create Database using Fluent Nhibernate

Is there any way to create a new database directly from my application? I'm using Asp.Net MVC5 C #, Fluent Nhibernate and PostgreSQL. Note: I can already access my tables through the application, what I need is to generate a new database thro...
asked by 10.01.2018 / 18:43
1
answer

Do you doubt with FluentNHibernate mapping?

I'm trying to create a scheme to set permissions on my system and these permissions are given to the user profile, where you can choose what each profile is allowed to do in each module. For this I have created some tables and I am in doubt how...
asked by 09.03.2016 / 05:26