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
2
votes
3 answers
Exception in Automapping and FNH in BuildSessionFactory Line
i am using the latest version of automapping and FNH with vs2008, i got this exception
"Tried to add property 'Description' when already added"
first , the exception is not informative! i cannot find out which class cause this error.
secondly, how…

Tiva
- 33
- 5
2
votes
1 answer
Fluent NHibernate - automapping: allow null for single properties
I know this question has been raised in similar form multiple times, but none of the threads could give me the concrete answer to my question.
I use Fluent NHibernate and Fluent`s auto-mapping to map my domain entities. Right now, I use this…

abedurftig
- 1,118
- 1
- 12
- 24
2
votes
1 answer
Possible to Define Filter in Fluent NHibernate FluentMappings?
When using auto mappings in Fluent NHibernate, you have the ability to do something like:
_configuration =
Fluently.Configure().
Database(
MsSqlConfiguration.MsSql2000.ConnectionString(
@"some…

Paul Brower
- 21
- 1
2
votes
1 answer
Fluent NHibernate + AutoMappings: Mystery Column in Generated SQL
I'm getting a SQL query from NH, and it's generating a column that does not exist (thus producing an ADOException from NH).
SELECT roles0_.CreatedBy_id as CreatedBy4_1_,
roles0_.Id as Id1_,
roles0_.Id as Id18_0_,
…

Jarrett Meyer
- 19,333
- 6
- 58
- 52
2
votes
0 answers
Asp.NET IAutoMappingOverride issue setting length
I am new with Asp.Net and have issue with setting length for one property of My entity.
So this is my Entity:
public class AccountData : Entity
{
public virtual Account Account { get; set; }
public virtual string Key { get; set; }
…

carpics
- 2,272
- 4
- 28
- 56
2
votes
1 answer
Ignore property mapping by accessbility in Fluent NHibernate AutoMapper
I have the following class which I am mapping using Fluent NHibernate's AutoMapper. I do not want the list items publically modifiable so have a public IEnumerable backed by an IList which can be populated internally or by NHibernate.
I want…

David Neale
- 16,498
- 6
- 59
- 85
2
votes
1 answer
how to tell flunet-nhibernate to use the ID from a base class (which is abstract and ignored in the mapping)
i have an abstract class
public abstract class Document
{
public int DocumentID {get; set;}
}
and derived class
public class DoctorDocument : Document{
public string DoctorName {get;set;}
}
and I'm using Fluent Auto Mapping,
i need not to make…

Nour
- 5,252
- 3
- 41
- 66
2
votes
1 answer
Fluent nhibernate automapping collection
I am trying to map my collections with FNHib automapping. The problems that I want to solve are:
1) I want all my collections in the project to be mapped via private field. How can I say that globally?
2) Is there any way to automap bidirectional…

mynkow
- 4,408
- 4
- 38
- 65
2
votes
1 answer
Fluent NHibernate Mapping - Composite Key
I'm trying to map the following tables/entities in FNH and seem to be getting nowhere fast!
**Tables**
Contacts
ID (PK - int - generated)
...
PhoneTypes
ID (PK - varchar - assigned) (e.g. MOBILE, FAX)
ContactPhones
ContactRefId …

Towser
- 21
- 1
- 3
2
votes
2 answers
mapping a Dictionary using AutoMapper to a List and storing it's key
I have an object, let's call it Sprite which has a Dictionary called SpriteImages. The key is a string, which needs to be 'stored' in the mapped object. This Dictionary needs to be mapped into a flat…

Karl Cassar
- 6,043
- 10
- 47
- 84
2
votes
1 answer
AutoMapping Custom Collections with FluentNHibernate
I am retrofitting a very large application to use NHibernate as it's data access strategy. Everything is going well with AutoMapping. Luckily when the domain layer was built, we used a code generator. The main issue that I am running into now is…

ScottBelchak
- 1,417
- 2
- 10
- 6
2
votes
1 answer
How to make Fluent NHibernate ignore Dictionary properties
I'm trying to make Fluent NHibernate's automapping ignore a Dictionary property on one of my classes, but Fluent is ignoring me instead. Ignoring other types of properties seems to work fine, but even after following the documentation and adding an…

Matt Winckler
- 2,223
- 2
- 23
- 27
2
votes
0 answers
Fluent NHibernate ModifiedDate Version Convention
I am trying to create a fluent Nhibernate automap convention for all the modifiedDate property of my application where it should set the value to get the current date during UPDATE. I am trying the following and its not working. I want the SQL…

Robi
- 287
- 4
- 11
2
votes
1 answer
FluentNHibernate Overrides: UseOverridesFromAssemblyOf non-generic version
I have a repository class that inherits from a generic implementation:
public namespace RepositoryImplementation {
public class PersonRepository : Web.Generics.GenericNHibernateRepository
}
The generic repository implementation uses…

ThiagoAlves
- 1,313
- 16
- 25
2
votes
1 answer
Automapping inheritance: How to add Discriminator convention for base class
By implementing ISubclassConvention, I can change the Discriminator Value for the subclasses in my class hierarchy. I'm now looking for a way to set the Discriminator Value for my base classes as well. Is there a way to change it with a convention…

Matthias Schippling
- 2,923
- 1
- 18
- 29