From: Ricardo P. (JIRA) <nh...@gm...> - 2011-04-04 14:01:38
|
Stateless Session, Named SQL Query and Flush Mode ------------------------------------------------- Key: NH-2620 URL: http://216.121.112.228/browse/NH-2620 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.1.0 Reporter: Ricardo Peres When the flush mode for a named SQL query is specified and the named query is called by a stateless session, it throws a method not found exception due to the fact that StatelessSessionImpl does not have a FlushMode property. Example: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="false" namespace="NHibernateGeneratorsTest.Domain" assembly="NHibernateGeneratorsTest"> <query name="AllCustomers" read-only="true" cacheable="false" flush-mode="never" fetch-size="500"> <![CDATA[ from Customer c ]]> </query> </hibernate-mapping> using (IStatelessSession session = factory.OpenStatelessSession()) { session.GetNamedQuery("AllCustomers").List(); } -- 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: Ricardo P. (JIRA) <nh...@gm...> - 2011-04-04 14:04:55
|
[ http://216.121.112.228/browse/NH-2620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20825#action_20825 ] Ricardo Peres commented on NH-2620: ----------------------------------- My fault: not entirely true, StatelessSessionImpl does have a FlushMode property, but it throws a NotSupportedException. Perhaps this property should be either implemented or removed. > Stateless Session, Named SQL Query and Flush Mode > ------------------------------------------------- > > Key: NH-2620 > URL: http://216.121.112.228/browse/NH-2620 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > When the flush mode for a named SQL query is specified and the named query is called by a stateless session, it throws a method not found exception due to the fact that StatelessSessionImpl does not have a FlushMode property. > Example: > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="false" namespace="NHibernateGeneratorsTest.Domain" assembly="NHibernateGeneratorsTest"> > <query name="AllCustomers" read-only="true" cacheable="false" flush-mode="never" fetch-size="500"> > <![CDATA[ > from Customer c > ]]> > </query> > </hibernate-mapping> > using (IStatelessSession session = factory.OpenStatelessSession()) > { > session.GetNamedQuery("AllCustomers").List(); > } -- 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-04-08 04:35:50
|
[ http://216.121.112.228/browse/NH-2620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2620. --------------------------- Resolution: Not an Issue NotSupportedException in stateless session is a clear explication, it mean: Not Supported by the class you are using. > Stateless Session, Named SQL Query and Flush Mode > ------------------------------------------------- > > Key: NH-2620 > URL: http://216.121.112.228/browse/NH-2620 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > When the flush mode for a named SQL query is specified and the named query is called by a stateless session, it throws a method not found exception due to the fact that StatelessSessionImpl does not have a FlushMode property. > Example: > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="false" namespace="NHibernateGeneratorsTest.Domain" assembly="NHibernateGeneratorsTest"> > <query name="AllCustomers" read-only="true" cacheable="false" flush-mode="never" fetch-size="500"> > <![CDATA[ > from Customer c > ]]> > </query> > </hibernate-mapping> > using (IStatelessSession session = factory.OpenStatelessSession()) > { > session.GetNamedQuery("AllCustomers").List(); > } -- 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: Ricardo P. (JIRA) <nh...@gm...> - 2011-04-08 04:47:56
|
[ http://216.121.112.228/browse/NH-2620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20847#action_20847 ] Ricardo Peres commented on NH-2620: ----------------------------------- In this case, why does the property exist in IStatelessSession? > Stateless Session, Named SQL Query and Flush Mode > ------------------------------------------------- > > Key: NH-2620 > URL: http://216.121.112.228/browse/NH-2620 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > When the flush mode for a named SQL query is specified and the named query is called by a stateless session, it throws a method not found exception due to the fact that StatelessSessionImpl does not have a FlushMode property. > Example: > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="false" namespace="NHibernateGeneratorsTest.Domain" assembly="NHibernateGeneratorsTest"> > <query name="AllCustomers" read-only="true" cacheable="false" flush-mode="never" fetch-size="500"> > <![CDATA[ > from Customer c > ]]> > </query> > </hibernate-mapping> > using (IStatelessSession session = factory.OpenStatelessSession()) > { > session.GetNamedQuery("AllCustomers").List(); > } -- 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 |