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
0 answers
Mapping tool (like Automapper) for Matlab
I've been enjoying the power of working with .NET types in Matlab using the Matlab .NET Interface.
I'm currently attempting a set of Matlab wrappers to expose a .NET API (wrapping to make the API feel "Matlab-y"). One of the things I find myself…

lightw8
- 3,262
- 2
- 25
- 35
2
votes
1 answer
Cache convention and overriding
I've made a convention that allow caching of all entites by default.
But for some entites I want to remove caching. I thought about using
AutoMappingOverriding but I don't know if it is possible to say
NoCache in AutoMappingOverriding.
Thanks,

Yann
- 1,388
- 2
- 11
- 9
2
votes
2 answers
Mapster not mapping members of generic class inherited from generic list
I'm having difficulties getting all members mapped in the following scenario:
I have a class that inherits from List:
public class PagedList : List
{
public int CurrentPage { get; private set; }
public int TotalPages { get; private…

Peter Rundqvist
- 275
- 3
- 18
2
votes
2 answers
How to rename a component column that is a foreign key?
We are using fluentnhibernate with automapping and we have a naming convention that all columns that are foreign keys, there column name will end with "Key". So we have a convention that looks like this:
public class ForeignKeyColumnNameConvention :…

erothvt
- 73
- 5
2
votes
2 answers
Fluent NHibernate: Mapping HasManyToMany by convention
I'm using Fluent NHibernate's AutoMap feature to map my entities. Most of my entities inherit from a base class Entity which has a property public IList Tags.
The tags are in a separate table in the database, so I use a many-to-many relation.…

davehauser
- 5,844
- 4
- 30
- 45
2
votes
1 answer
Fluent NHibernate automap base class overrides
I have the following base class.
public abstract class BaseEntity
{
public virtual long Id { get; set; }
public virtual DateTime CreateDate { get; set; }
public virtual DateTime? UpdateDate { get; set; }
public virtual bool IsDeleted…

Krzysztof Król
- 150
- 1
- 6
2
votes
1 answer
NHibernate Automapping problem
Recently I came across a strange behavior in Automapping of Fluent NHibernate. I have the following class structure (some properties cut off for the sake of brewity).
public class UserGroup
{
public virtual UserGroup ParentGroup { get; set; }
…

Piotr Gąsiorowski
- 21
- 1
2
votes
1 answer
Spring 3.0.5 - Adding @ModelAttribute to handler method signature results in JsonMappingException
I'm not sure whether this is a misconfiguration on my part, a misunderstanding of what can be accomplished via @ModelAttribute and automatic JSON content conversion, or a bug in either Spring or Jackson. If it turns out to be the latter, of course,…

Palpatim
- 9,074
- 35
- 43
2
votes
1 answer
How do I turn off Identifiergeneration in fluent nhibernate when using automapping
I use NHibernate 3.0 with fluent configuration. I automap my persistent model like this:
AutoMap
.AssemblyOf()
.Where(type => type.Namespace != null && type.Namespace.Contains("PersistendModel"))
This works fine, but I don't…

k.c.
- 1,755
- 1
- 29
- 53
2
votes
2 answers
Fluent NHibernate not auto-mapping one-to-many property in base class
Let's say I have an abstract base class defined as follows:
public abstract class CompanyBase : EntityBase
{
public virtual string Name { get; set; }
public virtual StreetAddress Address { get; set; }
public virtual…

Josh Anderson
- 5,975
- 2
- 35
- 48
2
votes
1 answer
Fluent NHibernate automap configuration throwing vague error
I'm trying out the automapping capability of Fluent NHibernate, and the same code that worked with explicit ClassMap configurations is failing when building the SessionFactory when I try to move it to automapping.
Here's the code:
public static…

Josh Anderson
- 5,975
- 2
- 35
- 48
2
votes
1 answer
Fluent NHibernate automap inheritance with subclass relationship
I am having an issue with using Fluent NHibernate automapping with Inheritance. Below is my entity setup (abbreviated for simplicity). I have configured Fluent NHibernate to create 1 class for the hierarchy with a discriminator column. The…

Jeremy
- 45
- 6
2
votes
1 answer
Mapping primitive classes (String, Boolean, etc) to each other with Dozer
I'm trying to use Dozer to automatically map from primitive classes to each other. At the end, the code might end up looking like this.
Boolean resultBoolean = mapper.map("true", Boolean.class);
While Dozer does support mapping String to Boolean…

Arthur Maltson
- 5,760
- 4
- 30
- 33
2
votes
1 answer
Fluent Nhibernate AutoMapping Inheritance and Ignoring an Abstract Property
I have an inheritance structure that i have succesfully mapped
Product (base)
PdfProduct (inherits from Product) & OtherProduct(inherits from Product)
These are working fine and i have done a simmilar thing before with hmb.xml files.
In the previous…

sianabanana
- 890
- 1
- 11
- 28
2
votes
0 answers
nhibernate automapping with union-subclass option
I want to (auto)map a base class and its derived class to two different tables, as described here by ayende (unioned subclasses).
however, according to fluent nHibernate's documentation, I don't see a way do do that.
the property in…

J. Ed
- 6,692
- 4
- 39
- 55