automapping Questions
2
i have the following scenario
public abstract class BaseClass
{
public virtual int Id {get; set};
public virtual string Name {get; set;}
}
public class FirstSubClass : BaseClass
{
//propertie...
Twi asked 12/9, 2011 at 8:44
5
Solved
I am feeling dejavu, but I cannot find the answer to this:
I have an array of objects that needs to look like this when inspecting a jQ $.post call:
limiter[0].Key
limiter[0].Value
so that it is...
Rhpositive asked 8/8, 2011 at 15:35
1
I am trying to map properties of the same type on a OneToMany association. I tried to distinguish with Description but kinda stuck here.
public class User
{
public virtual int UserId { get; set; ...
Nagana asked 5/6, 2015 at 10:38
3
Solved
I get this error:
Unable to cast object of type
'NHibernate.Collection.Generic.PersistentGenericSet1[IocWinFormTestEntities.People]'
to type 'System.Collections.Generic.ISet1[IocWinFormTestE...
Arkose asked 7/6, 2011 at 23:11
2
Solved
I have to create a Mapping with automapper.
Public class Source
{
public string Id;
public string Firstname;
public string Lastname;
}
Destination is
Public class Destination
{
public stri...
Hopping asked 19/2, 2014 at 10:23
6
Solved
When ever you set a string value in fluent NHibernate it alwasy sets the DB vales to Nvarchar(255), I need to store quite a lot of long string which are based on user inputs and 255 is impractical....
Liebermann asked 26/2, 2010 at 16:32
1
Solved
I don't understand why it's overwriting my whole object. The reason is that I get my User object from db an I want to assign new values from DTO. Instead of just adding those new values it's ...
Savoie asked 10/8, 2013 at 15:41
2
Solved
I have two tables, Locations and Facilities
They map to two classes,
public Location : Entity
{
//properties
}
public Facility : Entity
{
public virtual Location Location { get; set; }
}
Ev...
Compromise asked 26/8, 2010 at 21:48
1
Solved
I have this situation:
public namespace ANamespace
{
public abstract class ABase:IABase
{
//properties
}
public abstract class A : ABase
{
//properties
}
public class A1 : A
{
//prope...
Antitank asked 11/4, 2013 at 8:12
1
Solved
I've read a lot about Fluent NHibernate's ReferencesAny but I haven't seen a complete example. I think I understand most of it, but there is one part I don't get. In the class mapping ReferencesAny...
Confocal asked 11/8, 2012 at 6:15
5
Solved
Could some one help, how would I instruct automap to have not-null for
a column?
public class Paper : Entity
{
public Paper() { }
[DomainSignature]
[NotNull, NotEmpty]
public virtual string R...
Tainataint asked 9/4, 2010 at 8:19
1
Solved
Given the classes below:
public class Address : Place
{
public virtual string Street { get; set; }
public virtual int Number { get; set; }
public override string WhereAmI
{
get { string.For...
Jegar asked 9/5, 2011 at 11:13
5
I'm working with an existing database that uses some really ugly conventions. I'd like to use NHibernate, and I think I can fix all these ugly DB conventions using Fluent NHibernate's auto mapping ...
Soubrette asked 11/12, 2009 at 3:0
1
All of my entities and value objects implement marker interfaces IEntity and IValueObject. I have set them up to be treated as components like so:
public override bool IsComponent(Type type)
{
re...
Macri asked 26/1, 2011 at 22:23
5
Solved
How do I "turn on" cascading saves using AutoMap Persistence Model with Fluent NHibernate?
As in:
I Save the Person and the Arm should also be saved. Currently I get
"object references an unsa...
Leventis asked 25/2, 2009 at 17:2
2
Solved
Extreme newbie question. I have my database (SQL Server) set up to cascade deletes for my relationships so if you delete a parent entity all the children are deleted as well (ON DELETE CASCADE). I ...
Aforethought asked 25/10, 2011 at 17:31
4
Solved
I have a requirement to load a complex object called Node...well its not that complex...it looks like follows:-
A Node has a reference to EntityType which has a one to many with Property which in ...
Declarer asked 29/6, 2010 at 16:48
1
I wonder about something. I'm sitting here with a solution there I have 1 superclass that has 2 subclasses and I'm currently mapping this using JoinedSubClass, but I get that this method is obsolet...
Nicol asked 23/7, 2010 at 7:53
2
Solved
This is very similar to my previous question: FluentNHibernate: How to translate HasMany(x => x.Addresses).KeyColumn("PersonId") into automapping
Say I have these models:
public cl...
Loincloth asked 23/5, 2011 at 0:3
1
Solved
Say I have these models:
public class Person
{
public virtual int Id { get; private set; }
public virtual ICollection<Address> Addresses { get; private set; }
}
public class Address
{
pu...
Earring asked 22/5, 2011 at 22:38
2
Solved
Just getting my feet wet with some Fluent NHibernate AutoMap conventions, and ran into something I couldn't figure out. I assume I'm just not looking in the right place...
Basically trying to enfor...
Amphiaster asked 24/11, 2009 at 17:18
3
Solved
I'm using Fluent NHibernate, and auto-mapping the classes.
I have a computed property in a class along the lines of
public virtual DateTime? LastActionTimeStamp
{
get {
return Actions.Count == ...
Swoosh asked 5/3, 2010 at 13:22
10
Solved
How can I map a DataReader object into a class object by using generics?
For example I need to do the following:
public class Mapper<T>
{
public static List<T> MapObject(IDataReader...
Womankind asked 9/7, 2009 at 18:0
3
Solved
Fluent NHibernate doesn't like this, throwing an error:
{"Association references unmapped class: System.String"}
OK fine, I can see why this would cause a problem - but what's the best solutio...
Remunerative asked 21/12, 2009 at 19:13
1
Solved
If using Fluent NHibernate, is it possible to automap most classes, but specify that a couple of particular classes should be mapped using the regular fluent API rather than being automapped? And i...
Bran asked 20/8, 2010 at 10:52
1 Next >
© 2022 - 2024 — McMap. All rights reserved.