question:why put a constant in the select clause in a HQL/SQL/Criteria when
you have the client side to do it ?

2009/8/18 Martin Nyborg <[email protected]>

>
> I need to know if this is a bug.
>
> I expect that the SetInt32 function replaces some text with a number.
> In my example replaces the text projectId with 10
>
> On Aug 18, 1:45 am, Martin Nyborg <[email protected]> wrote:
> > I am trying to set the parameter projectId
> >
> > Session.CreateQuery(@"insert into Milestone (ProjectId, Definition,
> > ResponsibleID)
> >                                     select :projectId, md,
> > md.PreResponsibleId
> >                                     from MilestoneDefinition md where
> > md.Id >=0").SetInt32("projectId", 10).ExecuteUpdate();
> >
> > but the antlr parser fails. If I replace :projectId with 10 then it
> > works
> >
> > Session.CreateQuery(@"insert into Milestone (ProjectId, Definition,
> > ResponsibleID)
> >                                     select 10, md, md.PreResponsibleId
> >                                     from MilestoneDefinition md where
> > md.Id >=0").ExecuteUpdate();
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to