Skip to main content

All Questions

0 votes
1 answer
17 views

FluentNHibernate: how to map elements of a list

I have the following classes: public abstract class AbstractGeometry : IGeometry { // something } public class CompositeGeometry : AbstractGeometry { IGeometry MainGeometry { get; set; } ...
Nico's user avatar
  • 132
0 votes
1 answer
82 views

Map property whith where condition

I have one table for 3 entities: Password, Note, Credit Card. The table has an "EntityType" column. For example, for the password there is the value "P". How do I make Mapping so ...
Vladimir Böhm's user avatar
0 votes
1 answer
68 views

Mapping interface using FluentNhibernate and Autofac

i'm have a hard and extreming question, how i'm may using FluentNHibernate for mapping a interface? follow a example below how i'm imagine do: I'm have a interface: public interface IUser { ...
Michael Rodrigues's user avatar
2 votes
1 answer
4k views

Auto Increment (Identity) does not work in Fluent NHibernate

I'm using Fluent Nhibernate. Mapping class looks following: public class CategoryMap : ClassMap<Category> { public CategoryMap() { Id(x => x.CategoryId).UniqueKey("...
user6408649's user avatar
  • 1,297
1 vote
1 answer
130 views

NHibernate: One-to-many

I have a class called DadosvalmetSam (Parent) which have a one-to-many relationship with DadosfuncionarioSam(Child). Classes and mapping below: DadosvalmetSam public class DadosvalmetSam { ...
julio cesar's user avatar
0 votes
2 answers
318 views

Self referencing entity in NHibernate gives object references an unsaved transient instance exception

I have a self referencing entity named Category. A category may have one or more child categories. A category may also have no childs. I have made the entity and mapping but I keep getting this ...
Charanraj Golla's user avatar
0 votes
1 answer
97 views

Save parent with children in one query ( children have null value reference for parent)

Good day. I can't save parent with children in same query. But children have null reference for parent... Parent in my DB is table "food_in_the_cart" and model for it is here: public class ...
Amelina's user avatar
  • 172
0 votes
1 answer
82 views

Fluent nhibernate Automaping by property name

Is there a way to map properties of an entity automatically to column names (without code) Class Person { public int ID{get;set;} public string NAME {get;set;} } What I would like is to map this ...
mLar's user avatar
  • 3,057
1 vote
1 answer
946 views

Add custom columns on many to many relationship on NHibernate

I have a movie entity and a actor entity, these 2 entities have a many to many relationship, so I've mapped it as ManyToMany(x=>x.Movies) and ManyToMany(x=>x.Actors) but i'd like to have the character ...
Diego Barreto's user avatar
1 vote
1 answer
1k views

FluentNHibernate Formula Mapping C#

Is there a way to declare a map passing a Formula which will run just for a specific statement (SELECT in my case)? The problem is that I have something like Map(x => x.Id).Formula("SUBSTRING(id, ...
MGE's user avatar
  • 902
0 votes
1 answer
2k views

Fluent NHibernate HASMANY mapping without references

I am a beginner at using Fluent NHibernate. I am developing a C# application that has to interact with an existing database.Let say I have 2 tables: Items and ItemsList. Items: ID INT ...
Philippe's user avatar
1 vote
1 answer
145 views

Fluent NHibernate Create entity mapping for overlapping entities

For eg. I have two tables in my database NonResidentStudents - columns studentID, studentname, ModeOfTransport ResidentStudents - columns studentID, studentname, DateOfJoiningHostel studentID and ...
Subhashini Umapathi's user avatar
0 votes
2 answers
475 views

Fluent nhibernate m-to-m mapping with external table

I have two tables in Oracle Entity ---------- **EntityId** NUMBER(9), **EntityName** VARCHAR2 EntityLinks -------------- **EntityLinkId** NUMBER(9),**ParentEntityId** NUMBER(9), **ChildEntityId** ...
altyne's user avatar
  • 159
1 vote
1 answer
53 views

FluentNhibernate Cascading - Not Saved Parent Id [closed]

I have a problem with my fluent nhibernate. My Codes, BaseEntity: public abstract class BaseEntity : IEntity<BaseEntity, int>, IDisposable { public virtual int Id { get; set; } ...
srkn's user avatar
  • 45
3 votes
1 answer
80 views

How can i set a Column in a CompositeId mapping with NHibernate

I have one Composite Id map with NHibernate and I want to set a column in all those Id's. Is that possibel? public class MapProduction : ClassMap<Production> { public MapProduction() { ...
Pedro Franco's user avatar
  • 1,996

15 30 50 per page
1
2 3 4 5
13