Hello,
I have this code :
ISession session = UnitOfWork.CurrentSession;
IList list = session.CreateCriteria(typeof(Product))
.AddOrder(Order.Desc("LastUpdate"))
.SetMaxResults(number)
.List();
I'd like add a constraint : LastUpdate > Cr
Could you tell me how should I fix it to make it work?
What exactly is wrong?
Thanks, Stefan
On Jul 7, 12:36 am, Fabio Maulo wrote:
> Wrong mapping for a bidirectional-one-to-one based on FK
>
>
>
> On Tue, Jul 6, 2010 at 10:54 AM, xpista wrote:
> > Hi,
>
> > I have a problem with updating one
hi, What will be the difference between optimistic ans pessimistic database
coding in NHIbernate. Can u tell me please..
On Thu, Jul 1, 2010 at 5:02 PM, John Davidson wrote:
> NUnit tests do not run from Visual Studio but from the Command Line or
> Standalone GUI
>
> John Davidson
>
>
> On Thu,
Hi Steve
I saw you checked this in today. Jira is down so I couldn't file the
patch against it
public class HqlBitwiseOr : HqlExpression
{
public HqlBitwiseOr(IASTFactory factory, HqlExpression lhs,
HqlExpression rhs)
: base(HqlSqlWalker.BAND, "band", factory, lhs, rh
I did try (random re-writing) commenting out one then the other parts
of the subquery...
Both returned the same error.
I'll take another look at it tomorow.
Thank you both.
Gary
On Jul 5, 2:29 pm, Fabio Maulo wrote:
> First try removing this part
> OR
> actr.Gros
Wrong mapping for a bidirectional-one-to-one based on FK
On Tue, Jul 6, 2010 at 10:54 AM, xpista wrote:
> Hi,
>
> I have a problem with updating one-to-one mapped entity.
>
> In first session I create the class with a property which I map one-
> to-one. Cascading is set to "all".
> In second
have a look to the batcher ;)
On Tue, Jul 6, 2010 at 1:05 PM, Henning wrote:
> I tried using NH Prof but with no luck. I couldn't get any clear
> answer as to why stateless sessions are slower.
>
> In fact, you'd think that stateless sessions would be much faster
> since NHibernate doesn't track
On Tue, Jul 6, 2010 at 3:41 PM, Mike wrote:
> Thanks for the message, but if I'm using NHibernate I'd like to
> totally embrace the NHibernate way. :-)
>
well... as NH's team leader I can't say, at least publicly, something
different but... "NHibernate way" includes even SQL queries.
--
Fabio
As an side, can you give me an example of creating a Cartesian
product? I've heard the reference several times and I think I
understand what it means, but just want some confirmation. Thanks!
On Jul 6, 4:12 pm, "Richard Brown \(gmail\)"
wrote:
> IIRC you can write:
>
> .CreateCriteria()
>
That did the trick... thanks!
And thanks for the note on performance. I have been working on
optimizing my old queries that I did before NHProf.
On Jul 6, 4:12 pm, "Richard Brown \(gmail\)"
wrote:
> IIRC you can write:
>
> .CreateCriteria()
> .SetFetchMode(app => app.ApplicationWorkflow
IIRC you can write:
.CreateCriteria()
.SetFetchMode(app => app.ApplicationWorkflows,
FetchMode.Eager)
.SetFetchMode(app =>
app.ApplicationWorkflows[0].ApplicationStatus, FetchMode.Eager)
.Add(SqlExpression.In(app =>...
Also remember to consider performance:
http://nhforge.org/blog
I have the following Criteria query (using Lambda extensions):
var workflowResult = repository.GetSession()
.CreateCriteria()
.SetFetchMode(app =>
app.ApplicationWorkflows, FetchMode.Join)
.Add(SqlExpression.In(app =>
app.ID, uniqueIds))
Thanks for the message, but if I'm using NHibernate I'd like to
totally embrace the NHibernate way. :-)
On Jun 28, 5:43 pm, Fabio Maulo wrote:
> and, btw, if you have an existing SQL (you said " I'm going from something I
> was efficient with (relational data)") you can your SQL in NH directly o
Here's the problem: in short I use comb.guid identity strategy and I
need all the rows made after the saved marker..
Here's dummy code example of what I am trying to get:
return session.Linq
.Where(p =>
p.Id.CompareTo(lastSyncedEntityIdentity) == 1 )
.T
You just keep saying that "stateless sessions are slower" without providing
any code that we can reproduce.
Diego
On Tue, Jul 6, 2010 at 13:05, Henning wrote:
> I tried using NH Prof but with no luck. I couldn't get any clear
> answer as to why stateless sessions are slower.
>
> In fact, yo
I tried using NH Prof but with no luck. I couldn't get any clear
answer as to why stateless sessions are slower.
In fact, you'd think that stateless sessions would be much faster
since NHibernate doesn't track them. Means less overhead and faster
code.
Henning
On 6 Jul, 02:51, Diego Mijelshon w
sorry, i was initializating them with a log :|
thanks, it works perfectly
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to nhus...@googlegroups.com.
To unsubscribe from this group, send email to
nhusers+unsubscr.
All you have to do is replace that List call with Enumerable
(and, of course, the variable should be of type IEnumerable; you can
use var and forget about that).
If the proxies are being initialized, there's something about your classes
that you are not telling us.
Diego
On Tue, Jul 6, 2010
Hi,
I have a problem with updating one-to-one mapped entity.
In first session I create the class with a property which I map one-
to-one. Cascading is set to "all".
In second I load the entity and try to _replace_ the property. By
replace I mean I set it to new instance.
What I expect is
Steve, the exception was about missed parameters values (pagination
parameters missed).
I'll re-install oracle and check it.
--
Fabio Maulo
El 06/07/2010, a las 05:29, Steve Strong escribió:
I think there are actually two separate issues here. Single() &
SingleOrDefault() work correctly if th
That is not my post.
Btw the concept is:
You can serialize, in a file, a configured Configuration instance one
time and then upload the full configured Configuration deserializing
the file.
--
Fabio Maulo
El 06/07/2010, a las 03:57, Ilia Ternovich escribió:
> Hello Fabio!
>
> Thanks for the re
One possibility: Project the query results to get just the primary id.
Iterate, and use ISession.Load() on each one to get a proxy for the
full object.
/Oskar
2010/7/6 kor :
> can you make an example? i try but i can't use enumerable to add items
> to a collection without initialize them
>
> --
Currently, there's no way of explicitly specifying a left join within the
Linq syntax that's supported by the current (v3) provider. The approach
recommended by Oskar (below) is the standard way of doing a left join within
Linq, but right now the provider will throw an UnsupportedException if you
can you make an example? i try but i can't use enumerable to add items
to a collection without initialize them
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to nhus...@googlegroups.com.
To unsubscribe from this gro
Meh it seems that blindness is truly a programmer's trait (aka RTFM).
Anyhow a full reply so as to not leave the post orphan:
1. The AddEntity() will return a fully managed Entity
2. It hydrates the cache because of (1).
The true answer to my question is use the
qq.SetResultTransformer(Transform
I think there are actually two separate issues here. Single() &
SingleOrDefault() work correctly if there are zero or one results; they are
incorrect if there is more than one result (due to a buggy use of
SetMaxResults(1), which I'll fix). But that's not the bug that's being seen
here.
What And
Hi Graeme,
That does sound like a bug can you raise a JIRA for it?
Cheers,
Richard
From: Graeme Foster
Sent: Monday, July 05, 2010 2:49 PM
To: nhusers@googlegroups.com
Subject: [nhusers] JoinQueryOver and SelectList
HI all,
Not sure if this it the right forum or whethe
Thank you Tuna. This is exactly what I need.
2010/7/6 Tuna Toksoz :
> It was a sample code for Castle NH Facility. You should concentrate on the
> code itself, not the method names.
> You can serialize the configuration into a file. You should, however, be
> aware of config may have changed, so yo
It was a sample code for Castle NH Facility. You should concentrate on the
code itself, not the method names.
You can serialize the configuration into a file. You should, however, be
aware of config may have changed, so you should invalidate it when
necessary.
http://github.com/castleproject/Castl
29 matches
Mail list logo