Hi, We have changed the definition of the grammar file and we have the joins working now - OUTER / INNER ... Can share the changes with anyone who is interested.
We are using Views and have mapped the views in the HBM where every field of the view is part of the composite-id - with the key-property tag. Is this the right way, or has something changed. Thanks Anil On Friday, October 9, 2015 at 9:51:05 AM UTC+5:30, Anil Khanna wrote: > > Hi, > > 1. we have more than 2500+ instances of this construct (+) > 2. To implement JOINS we will have to change the definition of the HBM - > to include the relationship - One-to-one, many-to-one, one-to-many... > 3. For example we have the following construct - > SELECT T1.Field1, T1.Field2, T2.Field3 FROM Table1 T1, Table2 T2 WHERE > T1.ID (+)= T2.CODE AND T1.DEPT(+)= :dept; > > If we were to change this the SQL should probably look like > > SELECT T1.Field1, T1.Field2, T2.Field3 FROM Table1 T1 OUTER JOIN T1.Table2 > T2 WITH T1.ID = T2.CODE and T.DEPT=:DEPT;... > > and we would have to include the relationship in the .hbm files > (one-to-many) between T1 and T2. The ID in T1 is the primary key however > the code in T2 is not the PK. > After trying this we get an exception that T1.Table2 could not be found. > > Obviously we are missing something here. > Looking at the current challenges and the quantum of work... wondering > what would be better. > > Thanks and Regards, > > Anil > > On Thursday, October 8, 2015 at 11:33:23 PM UTC+5:30, Gunnar Liljas wrote: >> >> Are you sure you want to go this route? Fixing the queries in the code is >> probably easier and fixes the actual problem. >> >> /G >> >> 2015-10-08 13:35 GMT+02:00 Anil Khanna <[email protected]>: >> >>> Hi, >>> >>> I am using AntlrWorks 1.5 to load the .g files >>> (nhibernate-core-master\src\NHibernate\Hql\Ast\ANTLR) - Hql.g / >>> HqlSqlWalker.g / SqlGenerator.g ... however there are Console errors on >>> loading of the file. I have made no changes to the definition yet. >>> >>> I am able to generate the lexer /parser, but when i try and use these >>> files instead of the original ones then there are compile time errors. >>> >>> Is there a separate location from where i can get the grammar files. >>> What version of AntlrWorks is compatible. >>> >>> br >>> >>> Anil >>> >>> On Wednesday, October 7, 2015 at 11:51:44 AM UTC+5:30, Gunnar Liljas >>> wrote: >>>> >>>> You are certainly free to compile your own version, of course. >>>> >>>> 2015-10-07 6:11 GMT+02:00 Anil Khanna <[email protected]>: >>>> >>>>> Would an alternative be where we change the grammar definition to >>>>> support (+) constructs... >>>>> >>>>> br >>>>> >>>>> Anil >>>>> >>>>> >>>>> On Tuesday, October 6, 2015 at 3:26:52 PM UTC+5:30, Anil Khanna wrote: >>>>>> >>>>>> Hi All, >>>>>> >>>>>> We are looking at the opportunity to migrate from NH 1.2 to NH 4.0.4. >>>>>> Yes there was a long gap, but we know business ways are different from >>>>>> the >>>>>> technical ones. >>>>>> >>>>>> One of the breaking changes that we see is that Outer Joins structure >>>>>> of (+) is not supported any more. >>>>>> >>>>>> Earlier the following construct worked very well. - SELECT A.ID, >>>>>> B.NAME FROM T1 A, T2 B WHERE A.ID (+)= B.ID AND A.CODE(+)=:code >>>>>> >>>>>> However now the parser throws an unrecognized pattern error. (ANTLR >>>>>> has been introduced which was not present in NH 1.2) >>>>>> >>>>>> I have read some documentation and all of them say that we have to >>>>>> use the key words "outer join" (left / right) to get this working - in a >>>>>> particular way. >>>>>> >>>>>> We have more than 3000 such <(+)> constructs and was wondering if >>>>>> there is a way to get this working without refactoring the existing code. >>>>>> >>>>>> Thanks for your help in advance. >>>>>> >>>>>> Regards, >>>>>> >>>>>> Anil >>>>>> >>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "nhusers" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> Visit this group at http://groups.google.com/group/nhusers. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "nhusers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/nhusers. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
