Hi Thomas,

thanks for your reply

1) The spelling is ok because the query works well in 1.2
2) With your suggestion the query works now. The problem is to check
all queries!!!!
3) I'll check.

I found a solution using

<property name="query.factory_class">
        NHibernate.Hql.Classic.ClassicQueryTranslatorFactory,
NHibernate
      </property>

My personal guess:

the breaking change is too heavy.

what do you think about that?

On 15 Feb, 13:19, Thomas Koch <[email protected]> wrote:
> Hi Federico - I am not an HQL wizard myself, but I'll give it a shot
> anyway.
>
> I think the problem is the line:
>  from AppFrameWork.PersistentObject.TBLProductionOrderMaterialRegistry
> M , M.TBLProductionOrderRegistry P  where
>
> However, since you did not provide any information about the mapping
> its a little difficult.  ;-)
>
> A few suggestions:
> 1) Check your mappings and make sure spelling, and character casing in
> query, mapping and properties are identical.
> Your query is using a combination of upper-case and camel-case, but
> are your properties really in upper-case? If not, change the query so
> that the casing is exactly matching the casing of the properties.
>
> 2) Try to explicitly specify the join between M and
> M.TBLProductionOrderRegistry.
>
> 3) Browse the release notes from the NHibernate release 2.0 and 2.1
> and see whether or not there is a note about changes to the HQL
> syntax.
>
> Hope this helps.
>
> Thomas
>
> On 15 Feb., 08:51, Federico <[email protected]> wrote:
>
>
>
> > Hello,
>
> > I upgraded NHibernate from 1.2 to 2.1
> > I  got an error in one query that works well in 1.2
>
> > [NHibernate.Hql.Ast.ANTLR.QuerySyntaxException]
>
> >  = "M.TBLProductionOrderRegistry is not mapped [select
> > M.FLDMaterialChange, SUM(M.FLDMaterialClearPrice)  from
> > AppFrameWork.PersistentObject.TBLProductionOrderMaterialRegistry M ,
> > M.TBLProductionOrderRegistry P  where M.FLDClientCode =
> > P.FLDCLIENTCODE and M.FLDCompanyCode = P.FLDCOMPANYCODE and
> > M.FLDProductionOrder = P.FLDPRODUCTIONORDER  and M.FLDProductionData
> > =
> > P.FLDPRODUCTIONDATA and M.FLDProductionType = P.FLDPRODUCTIONTYPE
> > and
> > P.FLDCLIENTCODE = ? and P.FLDCOMPANYCODE = ? and P.FLDPRODUCTIONTYPE
> > = ? and P.FLDWareHouseNumber = ?  and P.FLDDocumentType = ?  and
> > P.FLDReferenceNumberUC is not null  and P.FLDDocumentReopened <> 'A'
> > and P.FLDDocumentDate is not null  and P.FLDDocumentDate < ? and
> > P.FLDDailyCloseDate is null  and M.FLDPerformance = '1' and
> > M.FLDDeliveredAmount <> 0  group by M.FLDMaterialChange   order by
> > M.FLDMaterialChange  ]"
>
> > Can you help me
>
> > thanks!!!

-- 
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