in NHibernate 3.2.0.GA
(retested it just now).
But why does it write Castle.DogProxy? Are you still using Castle
with NHibernate 3? Using the internal proxy factory it would write
AnimalProxy.
On 8 Nov., 06:42, acl123 andrewclawre...@gmail.com wrote:
In NHibernate 2 we used to be able to force
)
.OrderBy(x = x.Name)
.ThenBy(x = x.Code)
.Take(5)
.ToList();
A.
On 4 Lis, 04:41, acl123 andrewclawre...@gmail.com wrote:
Hi,
I'm upgrading from NHibernate 2.1.2 to 3.2.0.
We were using a the Linq provider a lot so I am making converting to
the new built-in Linq
Hi,
I'm upgrading from NHibernate 2.1.2 to 3.2.0.
We were using a the Linq provider a lot so I am making converting to
the new built-in Linq provider.
The following query is throwing a not supported exception:
Session.QueryFoo()
.Where(x = x.Code == testcode)
.Where(x = x.Bar.Id = 7)
Yes
On Jul 22, 4:52 am, epitka exptrade2...@yahoo.com wrote:
Are you using any custom event listeners, maybe for auditing?
On Jul 20, 9:06 pm,acl123andrewclawre...@gmail.com wrote:
I am still really struggling with this
I am still really struggling with this error:
http://groups.google.com/group/nhusers/browse_thread/thread/1db7fd843b0b4b56/df46cb0a150acd47
I have quite literally tried everything to get rid of it, but I can't.
The exception is very difficult to reproduce and only appears in our
exception logs
I have a query which is something like this:
Session.CreateSQLQuery(
@SELECT f.*, b.*, z.* FROM Foo f
LEFT OUTER JOIN Bar b ON b.Id = f.BarId
LEFT OUTER JOIN Zar z ON z.Id = b.ZarId
)
.AddEntity(f, typeof(Foo))
.AddJoin(b, f.BarId)
.AddJoin(z, f.ZarId)
I have the following situation:
public OfficeDbMap()
{
...
HasMany(x = x.Employees)
.Cache.NonStrictReadWrite();
}
What I notice is that if the Employee is deleted, the cache of Office-
Employee relationships does not become invalidated, causing all types
of trouble. How can I
I have exactly the same problem here.
On Feb 17, 1:05 am, Fabio Maulo fabioma...@gmail.com wrote:
AFIR there isn't BR in Criteria API since 1.2.0 - 2.0.0
2010/2/16 Gabriel Schenker gnschen...@gmail.com
Fabio, do you know of any breaking changes in the criteria query api
between release
I am using access=noop to try and create a query-only set, like
this:
set access=noop name=Bars
table=FooBarManyToManyRelationshipTable
key column=FooId /
many-to-many class=MyProject.Bar
column name=BarId /
I am running Nhibernate 2.1.2.4 and am encountering an issue which was
supposedly fixed last year.
The bug relates to the use of Projections.Conditional combined with
Projections.Constant and Restrictions.Eq.
The issue is described well here:
at 12:44 AM, acl123 andrewclawre...@gmail.com wrote:
This error has been popping up frequently in my logs:
deleted object would be re-saved by cascade
I have had no luck in replicating it however.
As far as I know, I am never deleting an object of the specified type
and neither am I assigning
This error has been popping up frequently in my logs:
deleted object would be re-saved by cascade
I have had no luck in replicating it however.
As far as I know, I am never deleting an object of the specified type
and neither am I assigning the object to two different collections or
references.
I am using Ayende's audit event listeners, so that on pre-update and
pre-insert, the insert/update dates are tracked (http://ayende.com/
Blog/archive/2009/04/29/nhibernate-ipreupdateeventlistener-amp-
ipreinserteventlistener.aspx)
The problem I am having is in the case that an entity is inserted,
I am getting a NullReferenceException when evicting an object:
System.NullReferenceException: Object reference not set to an instance
of an object.
at NHibernate.Event.Default.EvictVisitor.EvictCollection
(IPersistentCollection collection)
at
I am receiving the following error:
[AssertionFailure: collection [Foo.Bars] was not processed by flush()]
NHibernate.Engine.CollectionEntry.PostFlush(IPersistentCollection
collection) +163
NHibernate.Event.Default.AbstractFlushingEventListener.PostFlush
(ISessionImplementor session) +516
I am trying to eagerly fetch collections using selects, but all I am
getting is *inner* joins. What is going on?
Session.CreateCriteria(typeof(Foo))
.SetFetchMode(Bars, FetchMode.Select)
.CreateAlias(Bars, b)
.SetFetchMode(b.Bazes, FetchMode.Select);
I have tried
in event listeners? I would get this error if
I was doing a lazy load in a pre/post insert/update event. I have a
hack to get around this but I wouldn't say it is a best practice.
On Dec 14, 9:31 pm, acl123 andrewclawre...@gmail.com wrote:
I am receiving the following error:
[AssertionFailure
Exactly the same problem here :)
On Dec 3, 8:05 pm, Revin rs_h...@hotmail.com wrote:
Hi epitka,
Do you have any luck with this problem?
I got the same error message...
Thanks...
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To post to this
There are cases where one needs to set a default for an entity's
property, prior to the entity being inserted, but not when the entity
is first constructed.
The a pre-insert event-listener would seem to be the proper place to
do this, but there seems to be a problem with doing this if the event
If 2nd-level caching is enabled, is it possible for collections mapped
as eagerly fetch-select to be cached.
I'm surprised that this doesn't seem to be possible without manually
constructing a query.
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To
:32 pm, Fabio Maulo fabioma...@gmail.com wrote:
Without mappings and classes we can't say where is the bug.
Too much mysteries... starting from NullableDecimalProperty
2009/11/29 acl123 andrewclawre...@gmail.com
Similar bug, this time without the custom user type
Running the following NHibernate Linq query:
Session.LinqMyEntity.Select(x =
x.NullableMoneyProperty).FirstOrDefault();
I receive the following exception:
NHibernate.Exceptions.GenericADOException: Unable to
perform find[SQL: SQL not available] ---
Similar bug, this time without the custom user type:
Session.CreateCriteriaMyEntity()
.SetProjection(LambdaProjection.MinMyEntity(x =
x.NullableDecimalProperty))
.FutureValuedecimal?();
Results in the exception:
System.ArgumentException: The value is not of type
I have the following query:
Session.LinqFooBar()
.SetCachable(true)
.SetCacheRegion(foobar)
.Select(x = new Baz(x.Foo, x.Bar))
.ToList();
This works when caching is turned off, but with caching enabled I
receive the following exception:
System.InvalidCastException: Unable to
NHibernate breaks when using nested transactions though, so I'm
kind of stuck.
2009/10/19 acl123 andrewclawre...@gmail.com
By the way I am using Session-Per-Web-Request as this appears to be
the recommend way to use NHibernate with Asp .NET.
This means that I definitely don't want
23, 12:26 pm, acl123 andrewclawre...@gmail.com wrote:
Hi Fabio,
The issue is that the second transaction is committed, even though I
never call transaction.commit.
On Oct 20, 1:43 pm, Fabio Maulo fabioma...@gmail.com wrote:
Personally I don't know what you are talking about.You can have x
Ok thanks, my bigger problem is here:
http://groups.google.com/group/nhusers/browse_thread/thread/64d608afc2cd01c3
On Oct 19, 4:23 pm, Fabio Maulo fabioma...@gmail.com wrote:
your are calling Flush
2009/10/18 acl123 andrewclawre...@gmail.com
The following code demonstrates a misleading
you would use an NHibernate transaction - i.e. multiple
transaction per session.
Clearly NHibernate breaks when using nested transactions though, so
I'm kind of stuck.
On Oct 19, 12:59 pm, acl123 andrewclawre...@gmail.com wrote:
In this case, the second ADO command is committed to the database
If you are automatically generating your database from your NHibernate
config files, then this sort of thing is necessary.
I'm not sure if there are other benefits...
On Oct 15, 12:24 am, mynkow myn...@gmail.com wrote:
10xacl123, but why NHib has such an option then? What is the real
purpose
The following code demonstrates a misleading situation in which data
is committed to the database, even though commit is never called on a
transaction.
Could anyone explain why?
[TestFixture]
public class TestFixture
{
[Test]
public void Test()
{
In this case, the second ADO command is committed to the database,
whilst the first is rolled back. What is going on? This seems very
weird to me.
This is kind of a follow up question to my previous post here:
http://groups.google.com/group/nhusers/browse_thread/thread/241cc04309744321
You can do it in the mapping like this:
property name=SomeProperty
column default=myValue /
/property
Be aware that this doesn't actually create default values for your C#
objects. You will need to still do that the traditional way:
public class MyEntity
{
private string _someProperty
Hi,
Is it possible to map the following legacy table structure?
table Foo { Id (PK), Code (Unique), }
table Bar { Id (PK) }
table FooBars { FooCode, BarId }
The entity class would look like this:
class Foo
{
public virtual Guid Id { get; set; }
public virtual string Code { get; set;
Hi, I am running a Web Forms app on IIS 7 (Classic Mode).
I have recently deployed some code using NHibernate and it was running
fine in the live environment for about 4 days.
Then, overnight, the application pool restarted. When it started up,
NHibernate failed to initialize and my website was
I am trying to get the following unit test to succeed:
using (var transaction = new TransactionScope())
using (var connection = new ConnectionScope()) // Alez Acheson's
implementation
{
var foo = NHSessionManager.CurrentSession.LinqFoo
35 matches
Mail list logo