Questions tagged as 'nhibernate'

1
answer

Inheritance with 0: N Relationship using Nhibernate

I have the following situation: Person public class Pessoa { public Pessoa() { Endereco = new List<Endereco>(); } public virtual int IdPessoa { get; set; } public virtual string Nome...
asked by 28.01.2015 / 18:12
1
answer

Entity with simple key referencing another with key composed

I'm using Fluent NHibernate to map my classes, and I have the following situation: UserMap class public class UsuarioMap : ClassMap<Usuario> { public UsuarioMap() { Table("USUARIOS"); Id(x => x.ID, "USUARIO_...
asked by 13.05.2014 / 21:50
1
answer

Fill foreign key with primary key value

I'm doing an application with ASP.Net MVC and NHibernate, I have a business registration and a customer registration, where a company can have multiple clients. The classes are already mapped to the bank along with your relationship. Only the fo...
asked by 26.11.2014 / 20:20
0
answers

NHibernate keep two Mapping for a single object

I would like to keep two different mappings for a single object is it possible to do this with NHibernate?     
asked by 03.07.2018 / 20:58
0
answers

Fluent NHibernate does not load daughters tables

I have 3 related tables: Lesson (Id (PK), Name) LessonQuestion (Id (PK), LessonId (FK), Title) LessonQuestionAnswer (Id (PK), LessonQuestionId (FK), Value) My Model: public class Lesson : Entity { public virtual String Name { get; set; }...
asked by 15.06.2018 / 16:02
0
answers

Increase varchar field size (existing in the database) with NHibernate

Let's say that this field with size 11 exists in the database, across multiple clients. Map(x => x.CpfCnpj).Not.Nullable().Length(11); And one day I need to raise it to .Length (14). Is there any way to configure for NHibernate to do thi...
asked by 15.12.2016 / 14:49
1
answer

NHibernate Mapping

How do I map a table that has a compound key in NHibernate? For example: I have a table named configuracao . This table has a reference to the local_estoque table. Normally a mapping would look like this: References(x => x.L...
asked by 28.11.2016 / 17:35
1
answer

Problems with not null fields creation with FluentNHibernate

I have a problem creating fields using FluentNhibernate and Postgres. User Class: public class Usuario { public virtual int idUsuario { get; set; } public virtual string nome { get; set; } [NotNullNotEmpty] public virtual str...
asked by 01.10.2016 / 18:52
1
answer

Slowness with FluentNHibernate

I'm using FluentNHibernate in a simple product registration application. The first time I run something that accesses the database (product query screen or a product registration), the site will load for a long time. But after this first load...
asked by 10.05.2016 / 18:36
0
answers

Query using Firebird's SUBSTR with linq, queryOver, Criteria

Well, I need to create a query using the firebird "SUBSTR" function with linq, queryOver, or Criteria. I have option to create with HQL or SQL, but these would be my last options. Does anyone have an idea? Here is an example of the query. S...
asked by 10.05.2016 / 19:33