Fluent NHibernate lets you write NHibernate mappings in strongly typed C# code. This allows for easy refactoring, improved readability and more concise code.
0
votes
0answers
9 views
Expected '' but got '' at position 0
My tests involving lists always fail!
Code
My domain entities implementing IEntity and Id always generated by domain!
public interface IEntity { Guid Id { get; } }
public class Email : IEntity
{
...
0
votes
1answer
13 views
Bind List of objects to datagridview with Fluent NHibernate - ToString override
I have problem with displaying List of my objects like datasource in datagridview. I have class with few properties. Two of them are another objects.
I've tried to override ToString() in my classes, ...
0
votes
1answer
29 views
How to configure Fluent NHibernate explicit left/inner join for an association&
First, some code to explain my config:
public class OrdersSessionFactoryCreator
: ISessionFactoryCreator
{
public NHibernate.ISessionFactory Create()
{
var ret =
...
0
votes
1answer
11 views
Alternative mappings for different dialects
I have a problem that some dialects don't support Xml.
Namely SQLite used for in-memory db unit tests. I have a solution, I can alter the mapping to use a custom type:
Mapping line from ClassMap ...
-1
votes
1answer
22 views
C# Spring with Fluent NHibernate multiple databases issue [closed]
I'm trying to build a multi database (oracle, SQL server and Informix) application and I need to do it with Spring.net and Fluent NHibernate.
Anyone knows a good newbie tutorial? I need to know how ...
2
votes
2answers
35 views
fluent nhibernate copy a full entity
how can I best copy an entity instance in fluent nhibernate 3.3.1;
I read an object out of the database, I got an object, now I change some values of this object. This object with little changes want ...
0
votes
1answer
20 views
CreateCriteria sorting on aggregate function sum
SELECT
[ProductErpIdentifier],
[PriceValue],
[ManufacturerProductIdentifier],
SUM([QuantityOrdered]) as [QuantityOrdered]
FROM
[eCommerceDev].[dbo].[OrderItem]
GROUP BY
...
0
votes
1answer
13 views
Fluent NHibernate with MySQL with Mono and ASP MVC 3
I'm attempting to configure Fluent NHibernate with Automapping for MySQL and I've run into a problem. I've googled quite a bit and tried many different things, but haven't found a solution yet.
...
-1
votes
0answers
22 views
convert SQL to NHibernate 3 syntax query [closed]
As I am trying to learn NHibernate 3. I am finding it a bit challenging to write complex queries. I would like to convert the below SQL to its equivalent QueryOver<>, Linq or some other syntax ...
0
votes
1answer
41 views
FluentNHibernate - Mapping a class to multiple tables
Sorry for a lengthy question. But it is worth giving all the details so please bear with me through to the end.
I'm working against a legacy database over which I do not have much control. I want to ...
0
votes
1answer
28 views
Given a DateTime, how to Call .ToUniversalTime when using LINQ to NHibernate?
I have a method which returns all the events based on an EventTypeID:
public IList<Event> FindAll(int eventTypeId, DateTime? modifiedSince)
{
IQueryable<Event> query ...
1
vote
1answer
16 views
Specifying the name of a foreign key column
public class TransactionIdentityModelMapping : ClassMap<TransactionIdentityModel>
{
public TransactionIdentityModelMapping()
{
Table("TransactionIdentities");
Id(x => ...
-1
votes
1answer
24 views
no persister for System.Generic.List fluent nhibernate
I will insert a list of objects in my database with the following method:
public static void InsertObjekts(List<Objekt> objekts)
{
var session = SessionManager.CurrentSession;
using ...
1
vote
2answers
98 views
Why are my NHibernate queries so slow?
I'm building an ASP web forms app with Fluent NHibernate v2.0.50727 to SQL server backend.
For some reason querying tables with small data (~14 rows) takes seconds.
The maps are all simple: Id(x ...
1
vote
1answer
21 views
fluent nhibernate mapping many to many configuration error
I struggle with the HasManyToMany method in the fluent nhibernate world. Here is my "database" application. In this database I have some test data. Now I want to ask the database via the Query method ...