Hello, I have two questions on formulas.
1) The formula is written in arbitrary SQL, but there seems to be some parsing done on it to add table prefixes? Can this be relied on? eg: formula="(select count(*) from Serial s where s.Pick# = CNKZNB)" where CNKZNB is the actual entities column name, so the resulting query looks something like: select .... (select count(*) from Serial s where s.Pick# = tableprefix0_.CNKZNB) ... from MBCNREP tableprefix0_ ... Is this an acceptable use of a formula? I wasn't sure because it isn't 100% an arbitrary SQL statement because of the reliance on that prefix being appended via NHibernate. 2) In some database I have to add escaping characters to Pick#. This isn't working and I created an Jira ticket: http://nhjira.koah.net/browse/NH-1891 The resolution was that I had to use the native SQL escaping characters, not ``. The problem is this doesn't actually work either. For instance on SQL Server: (select count(*) from Serial s where s.[Pick#] = CNKZNB) This still causes the s.[Pick#] to be appended with the same prefix as CNKZNB: s.tableprefix0_.[Pick#] = tableprefix0_.CNKZNB. I'm not sure if this bug is caused by my misusing formulas or if it is actually an NH bug and needs to be reopened. 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 -~----------~----~----~----~------~----~------~--~---
