NHibernate is a mature, open source object-relational mapper (ORM) for the .NET framework.
0
votes
0answers
4 views
Querying for various entities with nHibernate 2.1.2, and I'm not sure this is the correct behavior
I'm executing the following HQL:
select entity
from @entityType entity
join entity.StationPointBegin spbegin
where spbegin.Line = ?
and entity.CurrentIndicator= 'Y'
order by ...
0
votes
0answers
6 views
NHibernate query cache not working when using join
When this gets called two times, the second invocation doesn't re-run the query on the database, the query caching works.
var query = from p in session.Query<Product>()
where ...
0
votes
2answers
20 views
Long commit results in slow performance of nHibernate
We're using nHibernate in an ASP web application with the session-per-request pattern. Some actions which the user is able to do, result in several hundreds of INSERT and UPDATE statements which takes ...
0
votes
1answer
19 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 ...
0
votes
1answer
13 views
Nhibernate Fetch/FetchMany/ThenFetch duplicate results
I'm quering my database. The structure looks like below
Country 1..M CountryLocales
1
..
M
Cities 1..M CityLocales
So, each Country has multiple locales, each City has multiple locales and a ...
1
vote
2answers
75 views
Why is NHibernate querying 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 ...
0
votes
0answers
6 views
Specifying the name of a foreign key column
public class TransactionIdentityModelMapping : ClassMap<TransactionIdentityModel>
{
public TransactionIdentityModelMapping()
{
Table("TransactionIdentities");
Id(x => ...
0
votes
0answers
12 views
NHibernate? Error when accesing my release build
I've finished (?) a development on a website that wasn't mine.
It uses NHibernate which I'm not famillir with.
My developpement seems to work fine on debug mode, but when I publish my release build, ...
1
vote
1answer
50 views
Using LINQ to pull collection until aggregate condition met
At a high level, I need a query that can pull a subset of records based on the sum of a column, just like Linq: How to query items from a collection until the sum reaches a certain value.
However, ...
0
votes
1answer
19 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 ...
0
votes
1answer
22 views
Query NHibernate Cache
Is there a way to check if an entity is allready in the cache of NHB (no 2nd level cache enabled)
when only the database primary key/Id is known, without hitting the DB as one would if using Get?
In ...
4
votes
6answers
5k views
NHibernate - AddEntity and AddJoin problem
I am using NHibernate with a SQL query to populate some entity objects.
I have an Item object which references a User object (to indicate the owner of the Item)
class Item
{
public User User;
}
My ...
0
votes
2answers
33 views
Timestamp accuracy - gained milliseconds
If I store a System.DateTime as a timestamp in SQL using this fluent nhibernate mapping:
Map(x => x.LoggedTimeStamp).CustomType("Timestamp")
.Not.Nullable();
When I ...
1
vote
0answers
16 views
Can't set precision and scale on decimal when creating SQL Server CE table with NHibernate
I'm using NHibernate mapping by code to create tables both on server (SQL Server 2008) and client (SQL Server CE 3.5).
This one column
Property(x => x.Latitude, c =>
{
...
0
votes
0answers
11 views
Error getting value from 'IsCurrentTimestampSelectStringCallable' on 'NHibernate.Dialect.SQLiteDialect'
I am at dead end now :(
I am trying to serialize my object by NewtonSoft.Json
string json = JsonConvert.SerializeObject(doc);
and getting such exception:
Error getting value from ...