Skip to main content

All Questions

Tagged with
-1 votes
2 answers
69 views

How can i map a computed list property in nhibernate

My model contais the following: public virtual DateTime LastSessionDate { get; set; } public virtual List<double> Values { get; set; } Values should be selected from other tables in a custom ...
jgayer's user avatar
  • 1
0 votes
1 answer
58 views

Problem getting list of related purchase order lines in sales order line

In my domain several purchase order lines can be assigned to one sales order line. When the purchase order is created it is saved in the database with a new natural Primary Key (DocEntry, LineNum) and ...
Tobias's user avatar
  • 11
1 vote
1 answer
46 views

Problem mapping Fluent NHibernate One-To-Many

I am having issues mapping two classes to a database via Fluent NHibernate. My classes are Asset and LogData. Asset has a bunch of decimal configuration values, and a Log which is a LogData. public ...
GalaxyGuy's user avatar
0 votes
2 answers
70 views

NHibernate Map an Object without a table

I'm trying to map the following object: public class DatabaseInfo { public virtual DateTime CurrentDateTime { get; set; } } with the following map: public class DatabaseInfoMap : ClassMapping<...
zayden's user avatar
  • 57
-1 votes
1 answer
55 views

Adding a Schema Prefix to a Table using XML Mapping - needed to convert a MSSQL Database to a MySQL

I have NHibernate XML mapping files that work wonderfully in MSSQL Databases. An example of a table is: <class name="Worm" table="`Worms`" schema="`dbo`"> Now I need to use the exact same ...
Queenferno's user avatar
1 vote
1 answer
1k views

NHibernate - Error dehydrating property value - updating entity

I'm having problem when saving an entity with association. Below is my code which gives the error Fluent Class inherited from Fluent Migration public override void Up() //Update your changes to ...
Paulo Balbino's user avatar
0 votes
1 answer
1k views

error "The element 'class' in has invalid child element 'set' in namespace " when mapping hbm file

H want to use inheritance in my application but when I run, my hbm mapping file has error. my code is here public class StudentDao { public virtual int Id { get; set; } public ...
reihan's user avatar
  • 23
0 votes
1 answer
68 views

Mapping interface using FluentNhibernate and Autofac

i'm have a hard and extreming question, how i'm may using FluentNHibernate for mapping a interface? follow a example below how i'm imagine do: I'm have a interface: public interface IUser { ...
Michael Rodrigues's user avatar
0 votes
1 answer
471 views

NHibernate select specific column

public class Company_Product { public virtual Int32 Id { get; set; } public virtual DateTime SalesDate { get; set; } public virtual Company Company{ get; set; } public virtual Product ...
RYan.A's user avatar
  • 1
-1 votes
1 answer
750 views

NHibernate OneToMany Mapping By Code

I saw many exemple on the internet on Mapping relation object with nhibernate but i can't make mine works. I have two Model for exemple: public class Vehicule { public virtual int Id { get; set;...
Nicolas Pretot's user avatar
1 vote
1 answer
130 views

NHibernate: One-to-many

I have a class called DadosvalmetSam (Parent) which have a one-to-many relationship with DadosfuncionarioSam(Child). Classes and mapping below: DadosvalmetSam public class DadosvalmetSam { ...
julio cesar's user avatar
3 votes
1 answer
2k views

Nhibernate "could not initialize a collection"

I have a following problem with my NHibernate One-to-many mappings. If I want to get all Customers, by my API methods, I get a following error: "$id":"1","Message":"An error has occurred.","...
Alojzy Mucha's user avatar
0 votes
1 answer
878 views

PostgreSQL mapping with NHibernate

I'm working with NHibernate on both SQL Server and PostgreSQL. I encounter some problems in mapping auto_increment attributes with PostgreSQL. Id(c => c.PlayerId, map => map.Generator(...
wael  ayari's user avatar
6 votes
2 answers
3k views

Should I transform Entity (Persistent) objects to DTO objects?

My project is layered as follows:- DAL (Entity) --> BLL (DTO) --> ApplicationComponent (ViewModel). There will be multiple components of application (ApplicationComponent) which will access BLL. ...
Amit Joshi's user avatar
  • 16.1k
1 vote
1 answer
210 views

NHibernate mapping class with attribute of same type

I am new to the .NET MVC. However this "problem" I am stuck at looks pretty common, I cannot find any tutorial or stackoverflow thread that explains how to do it properly. I have a class, MyClass ...
Patrik.Turcaj's user avatar

15 30 50 per page
1
2 3 4 5
29