You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(110) |
Nov
(296) |
Dec
(107) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(212) |
Feb
(263) |
Mar
(161) |
Apr
(183) |
May
(183) |
Jun
(75) |
Jul
(106) |
Aug
(88) |
Sep
(227) |
Oct
(143) |
Nov
(154) |
Dec
(53) |
2008 |
Jan
(77) |
Feb
|
Mar
|
Apr
(6) |
May
(103) |
Jun
(296) |
Jul
(54) |
Aug
|
Sep
(379) |
Oct
(283) |
Nov
(224) |
Dec
(214) |
2009 |
Jan
(129) |
Feb
(257) |
Mar
(136) |
Apr
(12) |
May
(329) |
Jun
(434) |
Jul
(375) |
Aug
(171) |
Sep
|
Oct
|
Nov
|
Dec
(54) |
2010 |
Jan
(198) |
Feb
(76) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(62) |
Jul
(210) |
Aug
(447) |
Sep
(330) |
Oct
(257) |
Nov
(133) |
Dec
(453) |
2011 |
Jan
(240) |
Feb
(128) |
Mar
(442) |
Apr
(320) |
May
(428) |
Jun
(141) |
Jul
(13) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Anton (JIRA) <nh...@gm...> - 2011-06-01 12:05:55
|
[ http://216.121.112.228/browse/NH-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21249#action_21249 ] Anton commented on NH-2755: --------------------------- It is in issue description :) "LockMode Upgrade not supported by NHibernate.Persister.Entity.SingleTableEntityPersister" > LockMode hash differs in x86 and 64bit OS > ----------------------------------------- > > Key: NH-2755 > URL: http://216.121.112.228/browse/NH-2755 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta2 > Reporter: Anton > Priority: Major > > When using LockMode over remoting between PCs with x86 and 64bit operating systems there is different result in GetHashCode. > It leads to error "LockMode Upgrade not supported by NHibernate.Persister.Entity.SingleTableEntityPersister " when I pass LockMode.Upgrade from x86 to 64bit to do > session.Lock(this, lockMode) > It is caused by generating and storing hash code upon creating instance of LockMode. > LockMode constructor uses a XOR (^) operand to generate and store hash code, and it has different behavior depends on OS type (x84, 64bit) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-06-01 11:47:57
|
[ http://216.121.112.228/browse/NH-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21248#action_21248 ] Fabio Maulo commented on NH-2755: --------------------------------- and the exception message ? > LockMode hash differs in x86 and 64bit OS > ----------------------------------------- > > Key: NH-2755 > URL: http://216.121.112.228/browse/NH-2755 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta2 > Reporter: Anton > Priority: Major > > When using LockMode over remoting between PCs with x86 and 64bit operating systems there is different result in GetHashCode. > It leads to error "LockMode Upgrade not supported by NHibernate.Persister.Entity.SingleTableEntityPersister " when I pass LockMode.Upgrade from x86 to 64bit to do > session.Lock(this, lockMode) > It is caused by generating and storing hash code upon creating instance of LockMode. > LockMode constructor uses a XOR (^) operand to generate and store hash code, and it has different behavior depends on OS type (x84, 64bit) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Anton (JIRA) <nh...@gm...> - 2011-06-01 07:39:55
|
[ http://216.121.112.228/browse/NH-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21247#action_21247 ] Anton commented on NH-2755: --------------------------- Here is callstack: Server stack trace: в NHibernate.Persister.Entity.AbstractEntityPersister.GetLocker(LockMode lockMode) в D:\Projects\NHibernate.trunk\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:строка 1730 в NHibernate.Persister.Entity.AbstractEntityPersister.Lock(Object id, Object version, Object obj, LockMode lockMode, ISessionImplementor session) в D:\Projects\NHibernate.trunk\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:строка 1734 в NHibernate.Event.Default.AbstractLockUpgradeEventListener.UpgradeLock(Object entity, EntityEntry entry, LockMode requestedLockMode, ISessionImplementor source) в D:\Projects\NHibernate.trunk\src\NHibernate\Event\Default\AbstractLockUpgradeEventListener.cs:строка 71 в NHibernate.Event.Default.DefaultLockEventListener.OnLock(LockEvent event) в D:\Projects\NHibernate.trunk\src\NHibernate\Event\Default\DefaultLockEventListener.cs:строка 55 в NHibernate.Impl.SessionImpl.FireLock(LockEvent lockEvent) в D:\Projects\NHibernate.trunk\src\NHibernate\Impl\SessionImpl.cs:строка 2520 в NHibernate.Impl.SessionImpl.Lock(Object obj, LockMode lockMode) в D:\Projects\NHibernate.trunk\src\NHibernate\Impl\SessionImpl.cs:строка 767 > LockMode hash differs in x86 and 64bit OS > ----------------------------------------- > > Key: NH-2755 > URL: http://216.121.112.228/browse/NH-2755 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta2 > Reporter: Anton > Priority: Major > > When using LockMode over remoting between PCs with x86 and 64bit operating systems there is different result in GetHashCode. > It leads to error "LockMode Upgrade not supported by NHibernate.Persister.Entity.SingleTableEntityPersister " when I pass LockMode.Upgrade from x86 to 64bit to do > session.Lock(this, lockMode) > It is caused by generating and storing hash code upon creating instance of LockMode. > LockMode constructor uses a XOR (^) operand to generate and store hash code, and it has different behavior depends on OS type (x84, 64bit) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Anton (JIRA) <nh...@gm...> - 2011-06-01 07:35:55
|
LockMode hash differs in x86 and 64bit OS ----------------------------------------- Key: NH-2755 URL: http://216.121.112.228/browse/NH-2755 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.2.0Beta2 Reporter: Anton Priority: Major When using LockMode over remoting between PCs with x86 and 64bit operating systems there is different result in GetHashCode. It leads to error "LockMode Upgrade not supported by NHibernate.Persister.Entity.SingleTableEntityPersister " when I pass LockMode.Upgrade from x86 to 64bit to do session.Lock(this, lockMode) It is caused by generating and storing hash code upon creating instance of LockMode. LockMode constructor uses a XOR (^) operand to generate and store hash code, and it has different behavior depends on OS type (x84, 64bit) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 21:08:46
|
[ http://216.121.112.228/browse/NH-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2754: ---------------------------- Priority: Trivial (was: Major) > Exception "Invalid filter-parameter name format\r\nParameter name: filterParameterName" when using colons in quoted strings in sql-query T-SQL definitions > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2754 > URL: http://216.121.112.228/browse/NH-2754 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sean McElroy > > I found a problem related to http://opensource.atlassian.com/projects/hibernate/browse/HHH-5932 in NH 3.0.0 GA -- when a sql-query exists that has a colon in the text (not just the HQL as the title of the referenced HHH issue has), and if you have a session filter enabled (which I do for multi-lingual support) the NHibernate loader appears to barf on it. In the query below, replacing statements with colons in quoted strings, i.e. COALESCE('ACH:'...) with COALESCE('ACH') fixes the problem. > It appears additional supports needs to be added to support colons in quoted strings in sql-query statements. The workaround I proposed above (remove colon from quoted string) works for my specific case, but I believe this is an issue that needs to be addressed for others who find themselves in the same scenario. > I can provide further source/information to reproduce the issue if needed. I am using SQL Server 2008 R2 as my data source. > *** EXCEPTION THROWN: > could not execute query > [ SELECT > COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))) AS ID, > tcc.ID AS TransactionCategoryClassificationID, > COUNT(pp.ID) AS PendingPaymentCount > FROM core.ScheduledPaymentBase sp > LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) > LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) > LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) > LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) > LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) > LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) > LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) > LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) > LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) > LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) > LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) > INNER JOIN core.Payee p ON > ( > p.ID IN ( > SELECT ptib.PayeeID > FROM core.PaymentTemplateItemBase ptib > WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) > ) > ) > INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( > SELECT tc.TransactionCategoryClassificationID > FROM core.TransactionCategory tc > WHERE tc.ID = p.DefaultExpenseTransactionCategoryID > ) > INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 > WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = ?) > AND sp.Frequency > 0 > AND Deleted = 0 > GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))), tcc.ID > HAVING COUNT(pp.ID) > 0 ] > Name:UserID - Value:9223372036854775807 > [SQL: SELECT > COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))) AS ID, > tcc.ID AS TransactionCategoryClassificationID, > COUNT(pp.ID) AS PendingPaymentCount > FROM core.ScheduledPaymentBase sp > LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) > LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) > LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) > LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) > LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) > LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) > LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) > LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) > LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) > LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) > LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) > INNER JOIN core.Payee p ON > ( > p.ID IN ( > SELECT ptib.PayeeID > FROM core.PaymentTemplateItemBase ptib > WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) > ) > ) > INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( > SELECT tc.TransactionCategoryClassificationID > FROM core.TransactionCategory tc > WHERE tc.ID = p.DefaultExpenseTransactionCategoryID > ) > INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 > WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = ?) > AND sp.Frequency > 0 > AND Deleted = 0 > GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))), tcc.ID > HAVING COUNT(pp.ID) > 0] > *** STACK TRACE: > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1683 > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in d:\CSharp\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1585 > at NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2055 > at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2037 > at NHibernate.Impl.SessionImpl.List[T](NativeSQLQuerySpecification spec, QueryParameters queryParameters) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2024 > at NHibernate.Impl.SqlQueryImpl.List[T]() in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SqlQueryImpl.cs:line 163 > at Alkami.App.Core.Data.Dao.HibernateScheduledPaymentDao.FindPayeeClassificationScheduledPaymentCountByUser(Int64 userId) in C:\SRC\ithryv\Alkami.App\Source\Alkami.App.Core.Data\Dao\HibernateScheduledPaymentDao.cs:line 221 > at CompositionAopProxy_3f677a65d116437faa1e64951adc1a05.FindPayeeClassificationScheduledPaymentCountByUser(Int64 userId) > at _dynamic_CompositionAopProxy_3f677a65d116437faa1e64951adc1a05.FindPayeeClassificationScheduledPaymentCountByUser(Object , Object[] ) > at Spring.Reflection.Dynamic.SafeMethod.Invoke(Object target, Object[] arguments) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Reflection\Dynamic\DynamicMethod.cs:line 156 > at Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Aop\Aop\Framework\DynamicMethodInvocation.cs:line 100 > at Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptor.Invoke(IMethodInvocation invocation) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Aop\Aop\Framework\Adapter\ThrowsAdviceInterceptor.cs:line 223 > *** EXCEPTION SITE: FindPayeeClassificationScheduledPaymentCountByUser line 207-221 block where exception is thrown: > var session = SessionFactoryUtils.GetSession(Factory, true); > if (session == null) > throw new InvalidOperationException("Unable to obtain an NHibernate session from the session factory"); > session.FlushMode = FlushMode.Never; > var getPayeeClassificationScheduledPaymentCount = session.GetNamedQuery("GetPayeeClassificationScheduledPaymentCountByUser"); > if (getPayeeClassificationScheduledPaymentCount == null) > throw new InvalidOperationException("Unable to obtain the named query 'GetPayeeClassificationScheduledPaymentCountByUser'"); > getPayeeClassificationScheduledPaymentCount > .SetParameter("UserID", userId) > .SetFirstResult(0) > .SetMaxResults(1000); > return getPayeeClassificationScheduledPaymentCount.List<PayeeClassificationScheduledPaymentCount>(); > **** SQL QUERY 'GetPayeeClassificationScheduledPaymentCountByUser' REFERENCED ABOVE: > <sql-query name="GetPayeeClassificationScheduledPaymentCountByUser"> > <query-param name="UserID" type="bigint" /> > <return class="PayeeClassificationScheduledPaymentCount"> > <return-property column="ID" name="ID" /> > <return-property column="TransactionCategoryClassificationID" name="TransactionCategoryClassificationID" /> > <return-property column="PendingPaymentCount" name="PendingPaymentCount" /> > </return> > <![CDATA[ > SELECT > COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))) AS ID, > tcc.ID AS TransactionCategoryClassificationID, > COUNT(pp.ID) AS PendingPaymentCount > FROM core.ScheduledPaymentBase sp > LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) > LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) > LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) > LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) > LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) > LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) > LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) > LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) > LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) > LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) > LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) > INNER JOIN core.Payee p ON > ( > p.ID IN ( > SELECT ptib.PayeeID > FROM core.PaymentTemplateItemBase ptib > WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) > ) > ) > INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( > SELECT tc.TransactionCategoryClassificationID > FROM core.TransactionCategory tc > WHERE tc.ID = p.DefaultExpenseTransactionCategoryID > ) > INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 > WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = :UserID) > AND sp.Frequency > 0 > AND Deleted = 0 > GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))), tcc.ID > HAVING COUNT(pp.ID) > 0 > ]]> > </sql-query> > *** RETURN CLASS DEFINITION PayeeClassificationScheduledPaymentCount > public class PayeeClassificationScheduledPaymentCount > { > public virtual string ID { get; set; } > public virtual long TransactionCategoryClassificationID { get; set; } > public virtual int PendingPaymentCount { get; set; } > } > *** RETURN CLASS MAPPING > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Alkami.App.Core.Data.Entities" assembly="Alkami.App.Core.Data" schema="core"> > <class name="PayeeClassificationScheduledPaymentCount"> > <id name="ID" type="string" /> > <property name="TransactionCategoryClassificationID" type="Int64" not-null="true" /> > <property name="PendingPaymentCount" type="Int32" not-null="true" /> > </class> > </hibernate-mapping> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 21:06:54
|
[ http://216.121.112.228/browse/NH-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21246#action_21246 ] Fabio Maulo commented on NH-2754: --------------------------------- please attach a failing test (only if you want that some committer will look to this issue, otherwise leave it as is). Thanks. > Exception "Invalid filter-parameter name format\r\nParameter name: filterParameterName" when using colons in quoted strings in sql-query T-SQL definitions > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2754 > URL: http://216.121.112.228/browse/NH-2754 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sean McElroy > Priority: Major > > I found a problem related to http://opensource.atlassian.com/projects/hibernate/browse/HHH-5932 in NH 3.0.0 GA -- when a sql-query exists that has a colon in the text (not just the HQL as the title of the referenced HHH issue has), and if you have a session filter enabled (which I do for multi-lingual support) the NHibernate loader appears to barf on it. In the query below, replacing statements with colons in quoted strings, i.e. COALESCE('ACH:'...) with COALESCE('ACH') fixes the problem. > It appears additional supports needs to be added to support colons in quoted strings in sql-query statements. The workaround I proposed above (remove colon from quoted string) works for my specific case, but I believe this is an issue that needs to be addressed for others who find themselves in the same scenario. > I can provide further source/information to reproduce the issue if needed. I am using SQL Server 2008 R2 as my data source. > *** EXCEPTION THROWN: > could not execute query > [ SELECT > COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))) AS ID, > tcc.ID AS TransactionCategoryClassificationID, > COUNT(pp.ID) AS PendingPaymentCount > FROM core.ScheduledPaymentBase sp > LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) > LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) > LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) > LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) > LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) > LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) > LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) > LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) > LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) > LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) > LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) > INNER JOIN core.Payee p ON > ( > p.ID IN ( > SELECT ptib.PayeeID > FROM core.PaymentTemplateItemBase ptib > WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) > ) > ) > INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( > SELECT tc.TransactionCategoryClassificationID > FROM core.TransactionCategory tc > WHERE tc.ID = p.DefaultExpenseTransactionCategoryID > ) > INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 > WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = ?) > AND sp.Frequency > 0 > AND Deleted = 0 > GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))), tcc.ID > HAVING COUNT(pp.ID) > 0 ] > Name:UserID - Value:9223372036854775807 > [SQL: SELECT > COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))) AS ID, > tcc.ID AS TransactionCategoryClassificationID, > COUNT(pp.ID) AS PendingPaymentCount > FROM core.ScheduledPaymentBase sp > LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) > LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) > LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) > LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) > LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) > LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) > LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) > LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) > LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) > LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) > LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) > INNER JOIN core.Payee p ON > ( > p.ID IN ( > SELECT ptib.PayeeID > FROM core.PaymentTemplateItemBase ptib > WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) > ) > ) > INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( > SELECT tc.TransactionCategoryClassificationID > FROM core.TransactionCategory tc > WHERE tc.ID = p.DefaultExpenseTransactionCategoryID > ) > INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 > WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = ?) > AND sp.Frequency > 0 > AND Deleted = 0 > GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))), tcc.ID > HAVING COUNT(pp.ID) > 0] > *** STACK TRACE: > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1683 > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in d:\CSharp\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1585 > at NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2055 > at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2037 > at NHibernate.Impl.SessionImpl.List[T](NativeSQLQuerySpecification spec, QueryParameters queryParameters) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2024 > at NHibernate.Impl.SqlQueryImpl.List[T]() in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SqlQueryImpl.cs:line 163 > at Alkami.App.Core.Data.Dao.HibernateScheduledPaymentDao.FindPayeeClassificationScheduledPaymentCountByUser(Int64 userId) in C:\SRC\ithryv\Alkami.App\Source\Alkami.App.Core.Data\Dao\HibernateScheduledPaymentDao.cs:line 221 > at CompositionAopProxy_3f677a65d116437faa1e64951adc1a05.FindPayeeClassificationScheduledPaymentCountByUser(Int64 userId) > at _dynamic_CompositionAopProxy_3f677a65d116437faa1e64951adc1a05.FindPayeeClassificationScheduledPaymentCountByUser(Object , Object[] ) > at Spring.Reflection.Dynamic.SafeMethod.Invoke(Object target, Object[] arguments) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Reflection\Dynamic\DynamicMethod.cs:line 156 > at Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Aop\Aop\Framework\DynamicMethodInvocation.cs:line 100 > at Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptor.Invoke(IMethodInvocation invocation) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Aop\Aop\Framework\Adapter\ThrowsAdviceInterceptor.cs:line 223 > *** EXCEPTION SITE: FindPayeeClassificationScheduledPaymentCountByUser line 207-221 block where exception is thrown: > var session = SessionFactoryUtils.GetSession(Factory, true); > if (session == null) > throw new InvalidOperationException("Unable to obtain an NHibernate session from the session factory"); > session.FlushMode = FlushMode.Never; > var getPayeeClassificationScheduledPaymentCount = session.GetNamedQuery("GetPayeeClassificationScheduledPaymentCountByUser"); > if (getPayeeClassificationScheduledPaymentCount == null) > throw new InvalidOperationException("Unable to obtain the named query 'GetPayeeClassificationScheduledPaymentCountByUser'"); > getPayeeClassificationScheduledPaymentCount > .SetParameter("UserID", userId) > .SetFirstResult(0) > .SetMaxResults(1000); > return getPayeeClassificationScheduledPaymentCount.List<PayeeClassificationScheduledPaymentCount>(); > **** SQL QUERY 'GetPayeeClassificationScheduledPaymentCountByUser' REFERENCED ABOVE: > <sql-query name="GetPayeeClassificationScheduledPaymentCountByUser"> > <query-param name="UserID" type="bigint" /> > <return class="PayeeClassificationScheduledPaymentCount"> > <return-property column="ID" name="ID" /> > <return-property column="TransactionCategoryClassificationID" name="TransactionCategoryClassificationID" /> > <return-property column="PendingPaymentCount" name="PendingPaymentCount" /> > </return> > <![CDATA[ > SELECT > COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))) AS ID, > tcc.ID AS TransactionCategoryClassificationID, > COUNT(pp.ID) AS PendingPaymentCount > FROM core.ScheduledPaymentBase sp > LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) > LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) > LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) > LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) > LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) > LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) > LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) > LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) > LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) > LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) > LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) > LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) > INNER JOIN core.Payee p ON > ( > p.ID IN ( > SELECT ptib.PayeeID > FROM core.PaymentTemplateItemBase ptib > WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) > ) > ) > INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( > SELECT tc.TransactionCategoryClassificationID > FROM core.TransactionCategory tc > WHERE tc.ID = p.DefaultExpenseTransactionCategoryID > ) > INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 > WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = :UserID) > AND sp.Frequency > 0 > AND Deleted = 0 > GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, > COALESCE(pbp.PayeeKey, > COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, > NULL))), tcc.ID > HAVING COUNT(pp.ID) > 0 > ]]> > </sql-query> > *** RETURN CLASS DEFINITION PayeeClassificationScheduledPaymentCount > public class PayeeClassificationScheduledPaymentCount > { > public virtual string ID { get; set; } > public virtual long TransactionCategoryClassificationID { get; set; } > public virtual int PendingPaymentCount { get; set; } > } > *** RETURN CLASS MAPPING > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Alkami.App.Core.Data.Entities" assembly="Alkami.App.Core.Data" schema="core"> > <class name="PayeeClassificationScheduledPaymentCount"> > <id name="ID" type="string" /> > <property name="TransactionCategoryClassificationID" type="Int64" not-null="true" /> > <property name="PendingPaymentCount" type="Int32" not-null="true" /> > </class> > </hibernate-mapping> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Sean M. (JIRA) <nh...@gm...> - 2011-05-31 18:18:46
|
Exception "Invalid filter-parameter name format\r\nParameter name: filterParameterName" when using colons in quoted strings in sql-query T-SQL definitions ---------------------------------------------------------------------------------------------------------------------------------------------------------- Key: NH-2754 URL: http://216.121.112.228/browse/NH-2754 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.0.0.GA Reporter: Sean McElroy Priority: Major I found a problem related to http://opensource.atlassian.com/projects/hibernate/browse/HHH-5932 in NH 3.0.0 GA -- when a sql-query exists that has a colon in the text (not just the HQL as the title of the referenced HHH issue has), and if you have a session filter enabled (which I do for multi-lingual support) the NHibernate loader appears to barf on it. In the query below, replacing statements with colons in quoted strings, i.e. COALESCE('ACH:'...) with COALESCE('ACH') fixes the problem. It appears additional supports needs to be added to support colons in quoted strings in sql-query statements. The workaround I proposed above (remove colon from quoted string) works for my specific case, but I believe this is an issue that needs to be addressed for others who find themselves in the same scenario. I can provide further source/information to reproduce the issue if needed. I am using SQL Server 2008 R2 as my data source. *** EXCEPTION THROWN: could not execute query [ SELECT COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, COALESCE(pbp.PayeeKey, COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, NULL))) AS ID, tcc.ID AS TransactionCategoryClassificationID, COUNT(pp.ID) AS PendingPaymentCount FROM core.ScheduledPaymentBase sp LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) INNER JOIN core.Payee p ON ( p.ID IN ( SELECT ptib.PayeeID FROM core.PaymentTemplateItemBase ptib WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) ) ) INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( SELECT tc.TransactionCategoryClassificationID FROM core.TransactionCategory tc WHERE tc.ID = p.DefaultExpenseTransactionCategoryID ) INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = ?) AND sp.Frequency > 0 AND Deleted = 0 GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, COALESCE(pbp.PayeeKey, COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, NULL))), tcc.ID HAVING COUNT(pp.ID) > 0 ] Name:UserID - Value:9223372036854775807 [SQL: SELECT COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, COALESCE(pbp.PayeeKey, COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, NULL))) AS ID, tcc.ID AS TransactionCategoryClassificationID, COUNT(pp.ID) AS PendingPaymentCount FROM core.ScheduledPaymentBase sp LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) INNER JOIN core.Payee p ON ( p.ID IN ( SELECT ptib.PayeeID FROM core.PaymentTemplateItemBase ptib WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) ) ) INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( SELECT tc.TransactionCategoryClassificationID FROM core.TransactionCategory tc WHERE tc.ID = p.DefaultExpenseTransactionCategoryID ) INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = ?) AND sp.Frequency > 0 AND Deleted = 0 GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, COALESCE(pbp.PayeeKey, COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, NULL))), tcc.ID HAVING COUNT(pp.ID) > 0] *** STACK TRACE: at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1683 at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in d:\CSharp\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1585 at NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2055 at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2037 at NHibernate.Impl.SessionImpl.List[T](NativeSQLQuerySpecification spec, QueryParameters queryParameters) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 2024 at NHibernate.Impl.SqlQueryImpl.List[T]() in d:\CSharp\NH\nhibernate\src\NHibernate\Impl\SqlQueryImpl.cs:line 163 at Alkami.App.Core.Data.Dao.HibernateScheduledPaymentDao.FindPayeeClassificationScheduledPaymentCountByUser(Int64 userId) in C:\SRC\ithryv\Alkami.App\Source\Alkami.App.Core.Data\Dao\HibernateScheduledPaymentDao.cs:line 221 at CompositionAopProxy_3f677a65d116437faa1e64951adc1a05.FindPayeeClassificationScheduledPaymentCountByUser(Int64 userId) at _dynamic_CompositionAopProxy_3f677a65d116437faa1e64951adc1a05.FindPayeeClassificationScheduledPaymentCountByUser(Object , Object[] ) at Spring.Reflection.Dynamic.SafeMethod.Invoke(Object target, Object[] arguments) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Reflection\Dynamic\DynamicMethod.cs:line 156 at Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Aop\Aop\Framework\DynamicMethodInvocation.cs:line 100 at Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptor.Invoke(IMethodInvocation invocation) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Aop\Aop\Framework\Adapter\ThrowsAdviceInterceptor.cs:line 223 *** EXCEPTION SITE: FindPayeeClassificationScheduledPaymentCountByUser line 207-221 block where exception is thrown: var session = SessionFactoryUtils.GetSession(Factory, true); if (session == null) throw new InvalidOperationException("Unable to obtain an NHibernate session from the session factory"); session.FlushMode = FlushMode.Never; var getPayeeClassificationScheduledPaymentCount = session.GetNamedQuery("GetPayeeClassificationScheduledPaymentCountByUser"); if (getPayeeClassificationScheduledPaymentCount == null) throw new InvalidOperationException("Unable to obtain the named query 'GetPayeeClassificationScheduledPaymentCountByUser'"); getPayeeClassificationScheduledPaymentCount .SetParameter("UserID", userId) .SetFirstResult(0) .SetMaxResults(1000); return getPayeeClassificationScheduledPaymentCount.List<PayeeClassificationScheduledPaymentCount>(); **** SQL QUERY 'GetPayeeClassificationScheduledPaymentCountByUser' REFERENCED ABOVE: <sql-query name="GetPayeeClassificationScheduledPaymentCountByUser"> <query-param name="UserID" type="bigint" /> <return class="PayeeClassificationScheduledPaymentCount"> <return-property column="ID" name="ID" /> <return-property column="TransactionCategoryClassificationID" name="TransactionCategoryClassificationID" /> <return-property column="PendingPaymentCount" name="PendingPaymentCount" /> </return> <![CDATA[ SELECT COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, COALESCE(pbp.PayeeKey, COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, NULL))) AS ID, tcc.ID AS TransactionCategoryClassificationID, COUNT(pp.ID) AS PendingPaymentCount FROM core.ScheduledPaymentBase sp LEFT OUTER JOIN core.ScheduledPaymentACH spa ON (sp.ID = spa.ID) LEFT OUTER JOIN core.PaymentTemplateACH pta ON (pta.ID = spa.PaymentTemplateACHID) LEFT OUTER JOIN core.ScheduledPaymentBillPay spbp ON (sp.ID = spbp.ID) LEFT OUTER JOIN core.PaymentTemplateBillPay ptbp ON (ptbp.ID = spbp.PaymentTemplateBillPayID) LEFT OUTER JOIN core.ScheduledPaymentWire spw ON (sp.ID = spw.ID) LEFT OUTER JOIN core.PaymentTemplateWire ptw ON (ptw.ID = spw.PaymentTemplateWireID) LEFT OUTER JOIN core.PaymentTemplateItemBase ptib ON (ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID)) LEFT OUTER JOIN core.PaymentTemplateItemACH ptia ON (ptia.ID = ptib.ID) LEFT OUTER JOIN core.PaymentTemplateItemBillPay ptibp ON (ptibp.ID = ptib.ID) LEFT OUTER JOIN core.PaymentTemplateItemWire ptiw ON (ptiw.ID = ptib.ID) LEFT OUTER JOIN core.PayeeACHAccount pach ON (spa.PayeeACHAccountID = pach.ID OR ptia.PayeeACHAccountID = pach.ID) LEFT OUTER JOIN core.PayeeBillPayAccount pbp ON (spbp.PayeeBillPayAccountID = pbp.ID OR ptibp.PayeeBillPayAccountID = pbp.ID) LEFT OUTER JOIN core.PayeeWireAccount pw ON (spw.PayeeWireAccountID = pw.ID OR ptiw.PayeeWireAccountID = pw.ID) INNER JOIN core.Payee p ON ( p.ID IN ( SELECT ptib.PayeeID FROM core.PaymentTemplateItemBase ptib WHERE ptib.PaymentTemplateBaseID IN (pta.ID, ptbp.ID, ptw.ID) ) ) INNER JOIN core.TransactionCategoryClassification tcc ON tcc.ID = ( SELECT tc.TransactionCategoryClassificationID FROM core.TransactionCategory tc WHERE tc.ID = p.DefaultExpenseTransactionCategoryID ) INNER JOIN core.PendingPaymentBase pp ON pp.ScheduledPaymentID = sp.ID AND [Status] = 1 WHERE sp.SourceAccountID IN (SELECT ua.AccountID FROM core.UserAccount ua WHERE ua.UserID = :UserID) AND sp.Frequency > 0 AND Deleted = 0 GROUP BY COALESCE('ACH:' + pach.ReceivingRoutingNumber + '_' + pach.ReceivingAccountNumber, COALESCE(pbp.PayeeKey, COALESCE('Wire:' + pw.CreditRoutingNumber + '_' + pw.CreditAccountNumber, NULL))), tcc.ID HAVING COUNT(pp.ID) > 0 ]]> </sql-query> *** RETURN CLASS DEFINITION PayeeClassificationScheduledPaymentCount public class PayeeClassificationScheduledPaymentCount { public virtual string ID { get; set; } public virtual long TransactionCategoryClassificationID { get; set; } public virtual int PendingPaymentCount { get; set; } } *** RETURN CLASS MAPPING <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Alkami.App.Core.Data.Entities" assembly="Alkami.App.Core.Data" schema="core"> <class name="PayeeClassificationScheduledPaymentCount"> <id name="ID" type="string" /> <property name="TransactionCategoryClassificationID" type="Int64" not-null="true" /> <property name="PendingPaymentCount" type="Int32" not-null="true" /> </class> </hibernate-mapping> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 16:47:01
|
[ http://216.121.112.228/browse/NH-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21245#action_21245 ] Fabio Maulo commented on NH-2415: --------------------------------- Thanks Julian to check it. I have missed this issue on past sunday. > HQL parameters not converted correctly to SQL > --------------------------------------------- > > Key: NH-2415 > URL: http://216.121.112.228/browse/NH-2415 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA, 3.0.0.Beta2 > Reporter: Brian Berns > Priority: Major > Fix For: 3.2.0Beta2 > > > Parameters added to an HQL query are jumbled in the resulting SQL. I have created a simple test case that demonstrates this problem using the BasicClassFixture: > [Test] > public void TestHQL() > { > var bc = InsertBasicClass(1); > using (var session = OpenSession()) > using (var trans = session.BeginTransaction()) > { > var hql = "from BasicClass bc where (bc.StringProperty = :prop) and (bc.StringMap[:key] = :value)"; > bc = session.CreateQuery(hql) > .SetParameter("prop", "string property") > .SetParameter("key", "keyZero") > .SetParameter("value", "string zero") > .UniqueResult<BasicClass>(); > Assert.NotNull(bc); > session.Delete(bc); > trans.Commit(); > } > } > The generated SQL is: > exec sp_executesql N'select basicclass0_.id as id16_, basicclass0_.char_p as char2_16_, basicclass0_.class_p as class3_16_, basicclass0_.cinfo_p as cinfo4_16_, basicclass0_.dtm_p as dtm5_16_, basicclass0_.shrt_p as shrt6_16_, basicclass0_.int_p as int7_16_, basicclass0_.lng_p as lng8_16_, basicclass0_.flt_p as flt9_16_, basicclass0_.str_p as str10_16_, basicclass0_.ticks_p as ticks11_16_, basicclass0_.tf_p as tf12_16_, basicclass0_.yn_p as yn13_16_, basicclass0_.priv_fld as priv14_16_ from bc basicclass0_, bc_stmap stringmap1_ where basicclass0_.id=stringmap1_.bc_id and stringmap1_.strm_idx = @p0 and basicclass0_.str_p=@p1 and stringmap1_.str_val=@p2',N'@p0 nvarchar(4000),@p1 nvarchar(10),@p2 nvarchar(4000)',@p0=N'string property',@p1=N'keyZero',@p2=N'string zero' > This query returns no rows when it should return exactly one. This is because @p0 and @p1 have been swapped. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Brian B. (JIRA) <nh...@gm...> - 2011-05-31 16:27:01
|
[ http://216.121.112.228/browse/NH-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21244#action_21244 ] Brian Berns commented on NH-2415: --------------------------------- Thank you! > HQL parameters not converted correctly to SQL > --------------------------------------------- > > Key: NH-2415 > URL: http://216.121.112.228/browse/NH-2415 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA, 3.0.0.Beta2 > Reporter: Brian Berns > Priority: Major > Fix For: 3.2.0Beta2 > > > Parameters added to an HQL query are jumbled in the resulting SQL. I have created a simple test case that demonstrates this problem using the BasicClassFixture: > [Test] > public void TestHQL() > { > var bc = InsertBasicClass(1); > using (var session = OpenSession()) > using (var trans = session.BeginTransaction()) > { > var hql = "from BasicClass bc where (bc.StringProperty = :prop) and (bc.StringMap[:key] = :value)"; > bc = session.CreateQuery(hql) > .SetParameter("prop", "string property") > .SetParameter("key", "keyZero") > .SetParameter("value", "string zero") > .UniqueResult<BasicClass>(); > Assert.NotNull(bc); > session.Delete(bc); > trans.Commit(); > } > } > The generated SQL is: > exec sp_executesql N'select basicclass0_.id as id16_, basicclass0_.char_p as char2_16_, basicclass0_.class_p as class3_16_, basicclass0_.cinfo_p as cinfo4_16_, basicclass0_.dtm_p as dtm5_16_, basicclass0_.shrt_p as shrt6_16_, basicclass0_.int_p as int7_16_, basicclass0_.lng_p as lng8_16_, basicclass0_.flt_p as flt9_16_, basicclass0_.str_p as str10_16_, basicclass0_.ticks_p as ticks11_16_, basicclass0_.tf_p as tf12_16_, basicclass0_.yn_p as yn13_16_, basicclass0_.priv_fld as priv14_16_ from bc basicclass0_, bc_stmap stringmap1_ where basicclass0_.id=stringmap1_.bc_id and stringmap1_.strm_idx = @p0 and basicclass0_.str_p=@p1 and stringmap1_.str_val=@p2',N'@p0 nvarchar(4000),@p1 nvarchar(10),@p2 nvarchar(4000)',@p0=N'string property',@p1=N'keyZero',@p2=N'string zero' > This query returns no rows when it should return exactly one. This is because @p0 and @p1 have been swapped. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Julian M. (JIRA) <nh...@gm...> - 2011-05-31 16:19:50
|
[ http://216.121.112.228/browse/NH-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Maughan resolved NH-2415. -------------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 Committed - now passing - test to trunk (r5898). > HQL parameters not converted correctly to SQL > --------------------------------------------- > > Key: NH-2415 > URL: http://216.121.112.228/browse/NH-2415 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA, 3.0.0.Beta2 > Reporter: Brian Berns > Priority: Major > Fix For: 3.2.0Beta2 > > > Parameters added to an HQL query are jumbled in the resulting SQL. I have created a simple test case that demonstrates this problem using the BasicClassFixture: > [Test] > public void TestHQL() > { > var bc = InsertBasicClass(1); > using (var session = OpenSession()) > using (var trans = session.BeginTransaction()) > { > var hql = "from BasicClass bc where (bc.StringProperty = :prop) and (bc.StringMap[:key] = :value)"; > bc = session.CreateQuery(hql) > .SetParameter("prop", "string property") > .SetParameter("key", "keyZero") > .SetParameter("value", "string zero") > .UniqueResult<BasicClass>(); > Assert.NotNull(bc); > session.Delete(bc); > trans.Commit(); > } > } > The generated SQL is: > exec sp_executesql N'select basicclass0_.id as id16_, basicclass0_.char_p as char2_16_, basicclass0_.class_p as class3_16_, basicclass0_.cinfo_p as cinfo4_16_, basicclass0_.dtm_p as dtm5_16_, basicclass0_.shrt_p as shrt6_16_, basicclass0_.int_p as int7_16_, basicclass0_.lng_p as lng8_16_, basicclass0_.flt_p as flt9_16_, basicclass0_.str_p as str10_16_, basicclass0_.ticks_p as ticks11_16_, basicclass0_.tf_p as tf12_16_, basicclass0_.yn_p as yn13_16_, basicclass0_.priv_fld as priv14_16_ from bc basicclass0_, bc_stmap stringmap1_ where basicclass0_.id=stringmap1_.bc_id and stringmap1_.strm_idx = @p0 and basicclass0_.str_p=@p1 and stringmap1_.str_val=@p2',N'@p0 nvarchar(4000),@p1 nvarchar(10),@p2 nvarchar(4000)',@p0=N'string property',@p1=N'keyZero',@p2=N'string zero' > This query returns no rows when it should return exactly one. This is because @p0 and @p1 have been swapped. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Patrick E. (JIRA) <nh...@gm...> - 2011-05-31 16:05:50
|
[ http://216.121.112.228/browse/NH-2700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Earl reassigned NH-2700: -------------------------------- Assignee: (was: Patrick Earl) > SqlFunctionProjection does not honor parameter order > ---------------------------------------------------- > > Key: NH-2700 > URL: http://216.121.112.228/browse/NH-2700 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Priority: Minor > Attachments: nh2700 failing test.patch > > > If you define a function in a custom dialect that does not have the parameters in order and use SqlFunctionProjection, the generated sql is wrong, and does not honor parameter order. > For example: > RegisterFunction( > "AddDays", > new SQLFunctionTemplate( > NHibernateUtil.DateTime, > "dateadd(day,?2,?1)" > > ) > ); > var proj = new SqlFunctionProjection("AddDays", NHibernateUtil.DateTime, > new IProjection[] > { > Projections.Property<ModelClass>(p=>p.Date1), > Projections.Property<ModelClass>(p=>p.Value1) > }); > Generated SQL (buggy): > SELECT dateadd(day,this_.Date1,this_.Value1) > Expected SQL: > SELECT dateadd(day,this_.Value1,this_.Date1) > Using an HQL query honors parameter order properly > I will attach a failing unit test. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Dario Q. (JIRA) <nh...@gm...> - 2011-05-31 15:52:55
|
[ http://216.121.112.228/browse/NHV-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21242#action_21242 ] Dario Quintana commented on NHV-117: ------------------------------------ Thanks for the report, I'll look at it. > Using Validator and Envers together > ----------------------------------- > > Key: NHV-117 > URL: http://216.121.112.228/browse/NHV-117 > Project: NHibernate.Validator > Issue Type: Bug > Components: Core > Affects Versions: 1.3.1 GA > Reporter: Jochen Jonckheere > Priority: Major > > When I try to use NHibernate.Envers and NHibernate.Validator in the same project I get the following exception. > Mesage: Object reference not set to an instance of an object. > StackTrace: > at NHibernate.Validator.Engine.SystemTypeExtensions.ShouldNeedValidation(Type clazz) > at NHibernate.Validator.Engine.ValidatorEngine.GetClassValidator(Type entityType) > at NHibernate.Validator.Engine.ValidatorEngine.AddValidator(Type entityType, IValidatableSubElementsInspector inspector) > at NHibernate.Validator.Event.ValidatePreInsertEventListener.Initialize(Configuration cfg) > at NHibernate.Event.EventListeners.InitializeListeners(Configuration cfg, Object[] list) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Event\EventListeners.cs:line 618 > at NHibernate.Event.EventListeners.InitializeListeners(Configuration cfg) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Event\EventListeners.cs:line 592 > at NHibernate.Cfg.Configuration.GetInitializedEventListeners() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1189 > at NHibernate.Cfg.Configuration.BuildSessionFactory() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1246 > at ....Installers.NHibernateInstaller.SessionFactoryFactory(INHibernateConfigurator nHibernateConfigurator, INHibernateEnversConfigurator nHibernateEnversConfigurator) in ...\Installers\NHibernateInstaller.cs:line 81 > Here's the part of the code that throws the exception: > // Build the NHibernate Configuration > var nHibernateConfiguration = nHibernateConfigurator.Configure(); > > // Initialize NHibernate Validator > nHibernateConfiguration.Initialize(); > > // Initialize NHibernate Envers > nHibernateConfiguration.IntegrateWithEnvers(nHibernateEnversConfigurator.Configure()); > // Build the SessionFactory > _factory = nHibernateConfiguration.BuildSessionFactory(); > More info on: https://groups.google.com/d/topic/nhusers/gu9Gf5TrD_U/discussion > And on: http://216.121.112.228/browse/NHE-11 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Dario Q. (JIRA) <nh...@gm...> - 2011-05-31 15:50:59
|
[ http://216.121.112.228/browse/NHV-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21241#action_21241 ] Dario Quintana commented on NHV-116: ------------------------------------ It's right, the sync has to be done in order to support NHibernate 3.2. Thanks for the report > remove reference to obsolete NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException > ------------------------------------------------------------------------------------------ > > Key: NHV-116 > URL: http://216.121.112.228/browse/NHV-116 > Project: NHibernate.Validator > Issue Type: Bug > Components: Core > Affects Versions: 1.3.1 GA > Reporter: korkless > Priority: Critical > > in the nhibernate project revision 5718 the class ProxyFactoryFactoryNotConfiguredException has been deleted, > it is yet used in nhibernate.validator at least in the method NHibernate.Validator.Util.NHibernateHelper.IsProxyFactoryConfigurated() (i have only vs 2005 so i can't check if it's used in other places) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 15:12:58
|
[ http://216.121.112.228/browse/NH-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21240#action_21240 ] Fabio Maulo commented on NH-2746: --------------------------------- The work to do is well known in our dev-list. The failing test is pretty complex involving query-cache and addition of filters. > Invalid SQL generated for MSSQL when using Filter and paging subquery together [regression from 2.1] > ---------------------------------------------------------------------------------------------------- > > Key: NH-2746 > URL: http://216.121.112.228/browse/NH-2746 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Pete Appleton > Priority: Major > Attachments: NHTest.zip, QueryParams.patch > > > On MS SQL Server 2005/2008, creating an ICriteria for a parent table with a join onto a child table and a paging subquery fails with a SQL exception if a filter is applied to the collection in the mapping and then enabled in code. If the filter is not enabled then the query functions as expected. > There's a very small test project provided to illustrate the problem; unfortunately, I've been unable to create a unit test using the template as I'm getting an error ["Could not find the dialect in the configuration"]; there is also a patch which appears to correct the problem, but it has not been subjected to the unit test suite. > NHibernate exception details: > NHibernate.Exceptions.GenericADOException: could not execute query > [ SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row) ] > [SQL: SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row)] ---> System.Data.SqlClient.SqlException: Must declare the scalar variable "@p1". > Incorrect syntax near the keyword 'as'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) > ... > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\AdoNet\AbstractBatcher.cs:line 247 > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1349 > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 413 > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 243 > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1694 > --- End of inner exception stack trace --- > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1703 > at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1601 > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1595 > at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Criteria\CriteriaLoader.cs:line 74 > at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 1919 > at NHibernate.Impl.CriteriaImpl.List(IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 265 > at NHibernate.Impl.CriteriaImpl.List[T]() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 276 > at NHTest.Program.TestQuery() in D:\SVN\Podium\Source\NHTest\Program.cs:line 69 > at NHTest.Program.Main(String[] args) in D:\SVN\Podium\Source\NHTest\Program.cs:line 26 > This is being run with .NET v4, though I don't believe that the framework version has an bearing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 15:09:51
|
[ http://216.121.112.228/browse/NH-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2753. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > one-shot-insert for <list> and <map> for unidirectional one-to-many > ------------------------------------------------------------------- > > Key: NH-2753 > URL: http://216.121.112.228/browse/NH-2753 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Fabio Maulo > Priority: Minor > Fix For: 3.2.0Beta2 > > > instead insert and then update the list/map index perform the insertion in one shot. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 15:03:50
|
one-shot-insert for <list> and <map> for unidirectional one-to-many ------------------------------------------------------------------- Key: NH-2753 URL: http://216.121.112.228/browse/NH-2753 Project: NHibernate Issue Type: Improvement Components: Core Affects Versions: 3.1.0 Reporter: Fabio Maulo Priority: Minor instead insert and then update the list/map index perform the insertion in one shot. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Pete A. (JIRA) <nh...@gm...> - 2011-05-31 13:55:57
|
[ http://216.121.112.228/browse/NH-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21239#action_21239 ] Pete Appleton commented on NH-2746: ----------------------------------- Thanks Fabio - do you have either an issue number that I can refer to for the work you mentioned, and ideally any pointers as to what I might be doing wrong with creating the correct unit test? > Invalid SQL generated for MSSQL when using Filter and paging subquery together [regression from 2.1] > ---------------------------------------------------------------------------------------------------- > > Key: NH-2746 > URL: http://216.121.112.228/browse/NH-2746 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Pete Appleton > Priority: Major > Attachments: NHTest.zip, QueryParams.patch > > > On MS SQL Server 2005/2008, creating an ICriteria for a parent table with a join onto a child table and a paging subquery fails with a SQL exception if a filter is applied to the collection in the mapping and then enabled in code. If the filter is not enabled then the query functions as expected. > There's a very small test project provided to illustrate the problem; unfortunately, I've been unable to create a unit test using the template as I'm getting an error ["Could not find the dialect in the configuration"]; there is also a patch which appears to correct the problem, but it has not been subjected to the unit test suite. > NHibernate exception details: > NHibernate.Exceptions.GenericADOException: could not execute query > [ SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row) ] > [SQL: SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row)] ---> System.Data.SqlClient.SqlException: Must declare the scalar variable "@p1". > Incorrect syntax near the keyword 'as'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) > ... > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\AdoNet\AbstractBatcher.cs:line 247 > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1349 > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 413 > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 243 > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1694 > --- End of inner exception stack trace --- > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1703 > at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1601 > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1595 > at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Criteria\CriteriaLoader.cs:line 74 > at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 1919 > at NHibernate.Impl.CriteriaImpl.List(IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 265 > at NHibernate.Impl.CriteriaImpl.List[T]() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 276 > at NHTest.Program.TestQuery() in D:\SVN\Podium\Source\NHTest\Program.cs:line 69 > at NHTest.Program.Main(String[] args) in D:\SVN\Podium\Source\NHTest\Program.cs:line 26 > This is being run with .NET v4, though I don't believe that the framework version has an bearing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 12:24:59
|
[ http://216.121.112.228/browse/NH-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2746: ---------------------------- Issue Type: Bug (was: Patch) > Invalid SQL generated for MSSQL when using Filter and paging subquery together [regression from 2.1] > ---------------------------------------------------------------------------------------------------- > > Key: NH-2746 > URL: http://216.121.112.228/browse/NH-2746 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Pete Appleton > Priority: Major > Attachments: NHTest.zip, QueryParams.patch > > > On MS SQL Server 2005/2008, creating an ICriteria for a parent table with a join onto a child table and a paging subquery fails with a SQL exception if a filter is applied to the collection in the mapping and then enabled in code. If the filter is not enabled then the query functions as expected. > There's a very small test project provided to illustrate the problem; unfortunately, I've been unable to create a unit test using the template as I'm getting an error ["Could not find the dialect in the configuration"]; there is also a patch which appears to correct the problem, but it has not been subjected to the unit test suite. > NHibernate exception details: > NHibernate.Exceptions.GenericADOException: could not execute query > [ SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row) ] > [SQL: SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row)] ---> System.Data.SqlClient.SqlException: Must declare the scalar variable "@p1". > Incorrect syntax near the keyword 'as'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) > ... > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\AdoNet\AbstractBatcher.cs:line 247 > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1349 > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 413 > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 243 > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1694 > --- End of inner exception stack trace --- > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1703 > at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1601 > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1595 > at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Criteria\CriteriaLoader.cs:line 74 > at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 1919 > at NHibernate.Impl.CriteriaImpl.List(IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 265 > at NHibernate.Impl.CriteriaImpl.List[T]() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 276 > at NHTest.Program.TestQuery() in D:\SVN\Podium\Source\NHTest\Program.cs:line 69 > at NHTest.Program.Main(String[] args) in D:\SVN\Podium\Source\NHTest\Program.cs:line 26 > This is being run with .NET v4, though I don't believe that the framework version has an bearing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 12:24:56
|
[ http://216.121.112.228/browse/NH-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21238#action_21238 ] Fabio Maulo commented on NH-2746: --------------------------------- Note fore committers: Do not apply that patch if you don't want see other problems. The work to do is the same done in QueryLoader with parameters backtrack. > Invalid SQL generated for MSSQL when using Filter and paging subquery together [regression from 2.1] > ---------------------------------------------------------------------------------------------------- > > Key: NH-2746 > URL: http://216.121.112.228/browse/NH-2746 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 3.1.0 > Reporter: Pete Appleton > Priority: Major > Attachments: NHTest.zip, QueryParams.patch > > > On MS SQL Server 2005/2008, creating an ICriteria for a parent table with a join onto a child table and a paging subquery fails with a SQL exception if a filter is applied to the collection in the mapping and then enabled in code. If the filter is not enabled then the query functions as expected. > There's a very small test project provided to illustrate the problem; unfortunately, I've been unable to create a unit test using the template as I'm getting an error ["Could not find the dialect in the configuration"]; there is also a patch which appears to correct the problem, but it has not been subjected to the unit test suite. > NHibernate exception details: > NHibernate.Exceptions.GenericADOException: could not execute query > [ SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row) ] > [SQL: SELECT this_.Id as Id0_1_, this_.Name as Name0_1_, children2_.T1Id as T3_3_, children2_.Id as Id3_, children2_.Id as Id1_0_, children2_.Name as Name1_0_, children2_.T1Id as T3_1_0_ FROM dbo.T1 this_ left outer join dbo.T2 children2_ on this_.Id=children2_.T1Id and @p0=children2_.Name WHERE this_.Id in (SELECT TOP (@p1) y0_ FROM (SELECT this_0_.Id as y0_, ROW_NUMBER() OVER(ORDER BY this_0_.Id) as __hibernate_sort_row FROM dbo.T1 this_0_) as query WHERE query.__hibernate_sort_row > @p2 ORDER BY query.__hibernate_sort_row)] ---> System.Data.SqlClient.SqlException: Must declare the scalar variable "@p1". > Incorrect syntax near the keyword 'as'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) > ... > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\AdoNet\AbstractBatcher.cs:line 247 > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1349 > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 413 > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 243 > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1694 > --- End of inner exception stack trace --- > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1703 > at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1601 > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Loader.cs:line 1595 > at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Loader\Criteria\CriteriaLoader.cs:line 74 > at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 1919 > at NHibernate.Impl.CriteriaImpl.List(IList results) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 265 > at NHibernate.Impl.CriteriaImpl.List[T]() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 276 > at NHTest.Program.TestQuery() in D:\SVN\Podium\Source\NHTest\Program.cs:line 69 > at NHTest.Program.Main(String[] args) in D:\SVN\Podium\Source\NHTest\Program.cs:line 26 > This is being run with .NET v4, though I don't believe that the framework version has an bearing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 12:20:53
|
[ http://216.121.112.228/browse/NH-2700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2700: ---------------------------- Fix Version/s: (was: 3.2.0Beta2) > SqlFunctionProjection does not honor parameter order > ---------------------------------------------------- > > Key: NH-2700 > URL: http://216.121.112.228/browse/NH-2700 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Assignee: Patrick Earl > Priority: Minor > Attachments: nh2700 failing test.patch > > > If you define a function in a custom dialect that does not have the parameters in order and use SqlFunctionProjection, the generated sql is wrong, and does not honor parameter order. > For example: > RegisterFunction( > "AddDays", > new SQLFunctionTemplate( > NHibernateUtil.DateTime, > "dateadd(day,?2,?1)" > > ) > ); > var proj = new SqlFunctionProjection("AddDays", NHibernateUtil.DateTime, > new IProjection[] > { > Projections.Property<ModelClass>(p=>p.Date1), > Projections.Property<ModelClass>(p=>p.Value1) > }); > Generated SQL (buggy): > SELECT dateadd(day,this_.Date1,this_.Value1) > Expected SQL: > SELECT dateadd(day,this_.Value1,this_.Date1) > Using an HQL query honors parameter order properly > I will attach a failing unit test. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 12:12:13
|
[ http://216.121.112.228/browse/NH-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-1050. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > Unidirectional One To Many Without Nullable Foreign Key > ------------------------------------------------------- > > Key: NH-1050 > URL: http://216.121.112.228/browse/NH-1050 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 1.2.0.GA > Reporter: Colin Jack > Priority: Major > Fix For: 3.2.0Beta2 > > > Especially with a legacy database we need to work with the database design that we have, with a view to future redesign. NHibernate seems to miss two features that would make this work really well: > 1) Mapping inheritance at the <component> level would be a big advantage > 2) A way to handle unidirectional many-one, with the foreign key in the one end causes us to make that key column nullable which is troublesome. > Its the second issue that I wanted to raise. We get into situations where the ID of the parent (one) is in the child (many) either because our database designers want that approach or because thats the way the database was originally designed. There seem to be two solutions: > 1) Use a bidirectional relationship - We don't want to design our associations just so that we can use NHibernate. > 2) Make the foreign key nullable. > It would be nice if we could handle this without making the foreign key nullable, even if we had to bake into the mapping more knowledge of our domain model (such as that the child is never saved except by the parent). So if we had an Order with Items in it then if we could say that Items are only saved from the Order (the Order being the aggregate root) then I would have thought you could avoid making the foreign key in Item nullable? > This link covers the sort of issue I'm discussing: > http://forum.hibernate.org/viewtopic.php?t=948277&view=next&sid=ec0773380349d434719a525332b9c962 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-31 12:11:51
|
[ http://216.121.112.228/browse/NH-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-941. ---------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > One-Many Requiring Nullable Foreign Keys > ---------------------------------------- > > Key: NH-941 > URL: http://216.121.112.228/browse/NH-941 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 1.2.0.Beta2 > Reporter: Colin Jack > Priority: Major > Fix For: 3.2.0Beta2 > > > We are working with a legacy database and due to dependencies (DTS/reports etc) it is very difficult to redesign. > We are also trying to balance good database design with good domain driven design, hoping to find a good balance between the two. > One place that this falls down is when mapping a one-many where the key is in the many end. Regardless of whether this is good database design we do have to deal with it quite a lot in our database and it cannot be engineered out easily, we thus have to map our domain classes tothe database it is now. Unfortunately this means making the foreign key nullable which is obviously a big step back in terms of database quality. > I've read the forum entries about this, including [url]http://forum.hibernate.org/viewtopic.php?t=957582&highlight=foriegn+foreign+key+nullable[/url], but would like to suggest that you try to add support for non-nullable foreign keys in these situations as it would be a big help when working with existing databases. > [b]Hibernate version:[/b] 1.2 > [b]Mapping documents: > Main Table [/b] > <?xml version="1.0" encoding="utf-8"?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> > <class name="SevenIM.FeeSettings.Domain.FeeTemplateDefinition, SevenIM.FeeSettings.Domain" table="FeeTemplateDefinition" lazy="false"> > <id name="Id" column="FeeTemplateDefinitionID"> > <generator class="identity" /> > </id> > <version name="_version" column="Version" access="field" /> > <property name="Description" column="Description" access="nosetter.camelcase-underscore"/> > <!-- need to map to fee template --> > <bag name="_feeCalculationSettingTemplates" access="field" cascade="all-delete-orphan" lazy="true"> > <key column="FeeTemplateSettingID" /> > <one-to-many class="SevenIM.FeeSettings.Domain.FeeCalculationSettingTemplate, SevenIM.FeeSettings.Domain" /> > </bag> > </class> > </hibernate-mapping> > [b]Sub Table [/b] > <?xml version="1.0" encoding="utf-8"?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> > <class name="SevenIM.FeeSettings.Domain.FeeCalculationSettingTemplate, SevenIM.FeeSettings.Domain" table="FeeTemplate" lazy="false"> > <id name="Id" column="FeeTemplateID"> > <generator class="identity" /> > </id> > <version name="_version" column="Version" access="field" /> > <property name="Kind" column="FeeTypeID" access="nosetter.camelcase-underscore"/> > </class> > </hibernate-mapping> > [b]Exception: [/b] > Test method SevenIM.FeeSettings.Persistence.Tests.FeeTemplatePersistenceTests.CanPersist threw exception: NHibernate.ADOException: could not insert: [SevenIM.FeeSettings.Domain.FeeCalculationSettingTemplate] ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'FeeTemplateDefinitionID', table 'CRM.dbo.FeeTemplate'; column does not allow nulls. INSERT fails. > The statement has been terminated.. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Patrick E. (JIRA) <nh...@gm...> - 2011-05-31 03:35:52
|
Re-enable CriteriaQueryTest.AllowToSetLimitOnSubquries for SQLite ----------------------------------------------------------------- Key: NH-2752 URL: http://216.121.112.228/browse/NH-2752 Project: NHibernate Issue Type: Task Components: Tests Affects Versions: 3.2.0Beta1 Reporter: Patrick Earl Assignee: Patrick Earl SQLite seems to have a bug related to named query parameters in subquery limit clauses. This has been reported to the sqlite-users mailing list and hopefully a fix will be made available soon. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-30 19:57:55
|
[ http://216.121.112.228/browse/NH-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21237#action_21237 ] Fabio Maulo commented on NH-2353: --------------------------------- and lot of voters with ZERO test. > Port support of unidirectional one-to-many with not nullable foreign key from Hibernate > --------------------------------------------------------------------------------------- > > Key: NH-2353 > URL: http://216.121.112.228/browse/NH-2353 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.0.0.Alpha3 > Reporter: cremor > Priority: Major > > According to the following links, Hibernate supports unidirectional one-to-manys with not nullable foreign keys by specifying the key as nullable=false: > https://forum.hibernate.org/viewtopic.php?p=2408442#p2408442 > http://opensource.atlassian.com/projects/hibernate/browse/HHH-5091 > Would be really nice if NHibernate would support that too. That way I could remove the references from child to parent entities in cases where the reference makes no sense in the domain model. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-30 19:52:43
|
[ http://216.121.112.228/browse/NH-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2353. --------------------------- Resolution: Duplicate Yes you are right, this is just a duplication of NH-1050. Thanks. > Port support of unidirectional one-to-many with not nullable foreign key from Hibernate > --------------------------------------------------------------------------------------- > > Key: NH-2353 > URL: http://216.121.112.228/browse/NH-2353 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.0.0.Alpha3 > Reporter: cremor > Priority: Major > > According to the following links, Hibernate supports unidirectional one-to-manys with not nullable foreign keys by specifying the key as nullable=false: > https://forum.hibernate.org/viewtopic.php?p=2408442#p2408442 > http://opensource.atlassian.com/projects/hibernate/browse/HHH-5091 > Would be really nice if NHibernate would support that too. That way I could remove the references from child to parent entities in cases where the reference makes no sense in the domain model. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |