Questions tagged [automapping]

The convention-based Auto Mapping feature of Fluent NHibernate. Not to be confused with AutoMapper, the convention-based object-to-object mapper.

251 questions
1
vote
2 answers

How to map part of aspnet_Users table using Fluent NHibernate

I'm trying to get Fluent NHibernate 1.0 RTM to map a User entity for me so that I have access to UserId and UserName inside my ASP.NET MVC application via NHibernate. I have: public class User { public virtual Guid UserId { get; protected set;…
Chris F
  • 2,886
  • 2
  • 28
  • 33
1
vote
0 answers

How to automap Table-per-class hierarchy in S#arp architecture

I am pretty new to S#harp architecture and fluent nhibernate. I was trying to build a sample solution using the template. MappingIntegrationTest fails for me when I try to run it for the following domains public class Component { public virtual…
Imran
  • 395
  • 2
  • 8
1
vote
2 answers

Can Fluent NHibernate's AutoMapper handle Interface types?

I typed this simplified example without the benefit of an IDE so forgive any syntax errors. When I try to automap this I get a FluentConfigurationException when I attempt to compile the mappings - "Association references unmapped class …
Kenneth Cochran
  • 11,954
  • 3
  • 52
  • 117
1
vote
1 answer

No persister for entity using AutoMap in Fluent Nhibernate?

I'm trying to utilise FluentNHibernate with Automapping but am receiving the following error No persister for: nHibernateSpike.Entities.Route NHibernate.MappingException: No persister for: nHibernateSpike.Entities.Route Here's the relevant…
Jason Hyland
  • 744
  • 1
  • 8
  • 21
1
vote
0 answers

Automapping a Composite Model with Composite Iteration with FluentNhibernate

I have a tree structured model and designed it with composite Pattern. for iterating through the entire hierachy Im using Composite Iteration. I have used this tutorial: http://www.blackwasp.co.uk/Composite.aspx but when I want to AutoMap the model,…
Hashem Aboonajmi
  • 13,077
  • 8
  • 66
  • 75
1
vote
4 answers

How do you automap List or float[] with Fluent NHibernate?

Having successfully gotten a sample program working, I'm now starting to do Real Work with Fluent NHibernate - trying to use Automapping on my project's class heirarchy. It's a scientific instrumentation application, and the classes I'm mapping …
Tom Bushell
  • 5,865
  • 4
  • 45
  • 60
1
vote
1 answer

How can I stop Fluent NHibernate automapping from creating foreign keys across the database?

I am using latest version of Fluent NHibernate automapping. Is there any convention or property I can set to stop creating the foreign key constraints across all the tables? I have nearly 200 classes, So I cannot go to each individual class and…
1
vote
1 answer

FluentNHibernate automapping ManyToMany

I'm trying to map a many-to-many relation, but the mapping doesn't work (list property stays null and items are not stored. I use the following tables: User(Id, Name, Password,...) Role(Id, Name) RoleUser(UserId, RoleId) with a compound primary…
1
vote
1 answer

QueryableExtensions for ValueInjecter

Does anything like QueryableExtensions for Automapper exist for ValueInjecter? For those unfamiliar with this functionality it allows for the automatic projection of properties to be performed for linq queries so that only the needed columns are…
DanP
  • 6,310
  • 4
  • 40
  • 68
1
vote
3 answers

Fluent NHibernate auto mapping - how to create a many-to-many relationship table?

just wondered if anyone know if there is a way to crate a Many-to-Many relationship table automatically using some attribute? without creating the table, or mapping a class to become that relation table. If i add the attribute …
Itay L
1
vote
1 answer

NHibernate HasManyToMany automapping not populating list on load

I've got a many-to-many relationship set up via AutoMapping. Now, the save and updates work fine as expected, however the DiscountGroups are not being loaded in DiscountDay when I get the entities afterwards. I cannot for the life of me work out…
Tom
  • 2,321
  • 2
  • 18
  • 29
1
vote
1 answer

Overriding Fluent NHibernate Automappings

This is a Fluent NHibernate newbie question, so bear with me. I have a set of classes, and I'm applying the Automapping capabilities to it. But I need to mark one of the properties of one of the techniques with a Unique constraint. In the Fluent…
Dave Hanna
  • 2,491
  • 3
  • 32
  • 52
1
vote
1 answer

Issue With Fluent Nhibernate Automapping and Guids / UniqueIdentifiers as Primary Key Fields

I am attempting to use the Fluent-NHibernate automapping functionality (in the latest version of the software) and am running into problems using Guids as the Primary Key fields. If I use integer fields for the primary keys, the tables are generated…
1
vote
1 answer

FluentNHibernate AutoMapping : ClassConvention Does not work

I have a model library that I want to automatically build its NHibernate mappings using FluentNhibernate. There's a convention that I'd like to add to this model and that is each table name ends with 's'. So here's what I do : new…
Beatles1692
  • 5,214
  • 34
  • 65
1
vote
1 answer

NHibnernate SQL Lite in memory unit testing doesn't work the same as a physical db

I am in the process of building a "get to know NHibernate project). My unit tests (nunit) provide the repository layer the same configuration as the normal mvc site but using "SQLiteConfiguration.Standard.InMemory()" instead of…
Jon
  • 15,110
  • 28
  • 92
  • 132