The convention-based Auto Mapping feature of Fluent NHibernate. Not to be confused with AutoMapper, the convention-based object-to-object mapper.
Questions tagged [automapping]
251 questions
0
votes
1 answer
persiste the deletion operation from a collection in NHibernate
When i delete some object (or remove it) from a collection (such as list) and call SaveOrUpdate from the parent of this collection the row of the child isn't removed but updated by setting the foreign key value to NULL.
How can i force it to be…

Saw
- 6,199
- 11
- 53
- 104
0
votes
1 answer
NHibernate, i invoke delete but update is invoked automatically!
in NHibernate, i invoke delete but update is invoked automatically!!
i use FluentNhibernate Automapping.

Saw
- 6,199
- 11
- 53
- 104
0
votes
1 answer
Automatically generate Created date in Fluent NHibernate Automapping
I am using Fluent NHibernate's automapping / conventions functionality to map my entities to database tables. I have this abstract class which every domain entity in my application derives itself from:
public abstract class Entity
{
public…

adaam
- 3,700
- 7
- 27
- 51
0
votes
2 answers
fluent-nhibernate automapping foreign key inserts null.
I have a class called Worker
public class Worker : BaseEntity
{
public virtual int WorkerID { get; set; }
public virtual string Name { get; set; }
public virtual IList Indemnifications { get; set; }
}
public class…

Nour
- 5,252
- 3
- 41
- 66
0
votes
1 answer
How to override S#arp architecture automapping with HBM files?
I'm facing problems with composite keys in S#arp architecture. Anyone have an example of how to do that or how to use mapping files with automapping?
0
votes
1 answer
Map 2 lists into a list of DTOs using AutoMapper
I have two tables (lists): customers and sales that have an one-to-many relationship. I'm trying to create an automap that results in a list populated with CustomerSalesDto. For every Sale object a new CustomerSalesDto should be created with the…

Sam
- 1,303
- 3
- 23
- 41
0
votes
1 answer
Mapping db view without Id to class model in NHibernate
In my application, I use NHibernate ORM and Automapper to mapping entities to class model. As:
fluent-nhibernate/wiki/Auto-mapping
For tables its working.
Problem is when a try mapping db view without Id field, like:
public class VTest
{
…

devQwerty
- 106
- 1
- 12
0
votes
1 answer
Getting null values when i map using autoMapper
These are my Attribute Models
public class MasterPricerTravelBoardSearchReplyModel
{
public MasterPricerTravelBoardSearchReplyModel()
{
FlightIndex = new List();
}
…

Syed Rasheed
- 559
- 2
- 10
- 29
0
votes
2 answers
When auto-mapping a collection with Fluent NHibernate, how do you make the child's foreign key to the parent nullable?
If I have a parent class:
public class Parent
{
public Parent()
{
Children = new List();
}
IList Children {get; private set;}
}
and a child class like so:
public class Child
{
public SomeThirdClass Friend…

Mark Rogers
- 96,497
- 18
- 85
- 138
0
votes
2 answers
Fluent Nhibernate Mapping Single class on two database tables
I am having problems with Mapping.
I have two tables in my database as follows: Employee and EmployeeManagers
Employee
EmployeeId int
Name nvarchar
EmployeeManagers
EmployeeIdFk int
ManagerIdFk int
So the employee can have 0 or more Managers. A…

nabeelfarid
- 4,156
- 5
- 42
- 60
0
votes
1 answer
AutoMapping between the Same Enum C#
I have this auto mapper that is mapping enum type,
Mapper.CreateMap()
.ForMember(dest => dest.ProfessionalHistoryDto.CarryingTime,
opt => opt.MapFrom(src =>…

Nadeem Tabbaa
- 39
- 9
0
votes
2 answers
Automapper convertion from a class with list to class with list
Class SourceClass
{
string name {get;set;}
IList typeAList {get;set;}
}
Class DestinationClass
{
string name {get;set;}
IList typeBList {get;set;}
}
How to map this two class using automapper ?
Try 1:-
…

Dhinesh
- 53
- 1
- 9
0
votes
1 answer
Mapping Data Annotation of a Model object to Custom Class object .net mvc
i'm wondering how to map A model object Into a more generic class object and saving values of DataAnnotation to specified field.
My Example Model that for example. I want to map 1 Model object to 1 FieldSetModel object, that contain the list of…

andrea
- 381
- 5
- 23
0
votes
1 answer
Fluent NHibernate can not auto create mappings for a dynamic assembly
I am working on a legacy code base that builds some of its entities on the fly.I'd like to be able to add these entities to my auto persistent model using AddEntityAssembly like this :
var model =new AutoPersistenceModel()
…

Beatles1692
- 5,214
- 34
- 65
0
votes
2 answers
Getting error "Association references unmapped class" when using interfaces in model
I'm trying to use the automap functionality in fluent to generate a
DDL for the following model and program, but somehow I keep getting
the error "Association references unmapped class: IRole" when I call
the GenerateSchemaCreationScript method in…

Bjarke
- 21
- 2
- 5