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: Chris B. (JIRA) <nh...@gm...> - 2011-05-21 18:40:35
|
Linq Count() does not respect previous calls to Select() or Distinct() ---------------------------------------------------------------------- Key: NH-2722 URL: http://216.121.112.228/browse/NH-2722 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.1.0 Reporter: Chris Block Priority: Minor session.Query<DomainEntity>() .Select(x => x.Property) .Distinct() .Count() Results in a count(*) query being executed, rather than a count(distinct Property) query. session.Query<DomainEntity>() .Select(x => x.Property) .Count() Results in a count(*) query, rather than a count(Property) query. -- 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-21 13:20:37
|
[ http://216.121.112.228/browse/NH-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-1270. --------------------------- Resolution: Obsolete <class name="User"> <id name="Id" type="Guid"> <generator class="guid" /> </id> <property name="Name" /> <set name="Roles" table="UsersToRoles" inverse="true"> <key column="UserId" /> <many-to-many class="Role" column="RoleId" foreign-key="FK_RoleInUser" /> </set> </class> <class name="Role"> <id name="Id" type="Guid"> <generator class="guid" /> </id> <property name="Name" /> <set name="Users" table="UsersToRoles"> <key column="RoleId" /> <many-to-many class="User" column="UserId" foreign-key="FK_UserInRole" /> </set> </class> Creates this schema: create table [User] ( Id UNIQUEIDENTIFIER not null, Name NVARCHAR(255) null, primary key (Id) ) create table UsersToRoles ( UserId UNIQUEIDENTIFIER not null, RoleId UNIQUEIDENTIFIER not null, primary key (RoleId, UserId) ) create table [Role] ( Id UNIQUEIDENTIFIER not null, Name NVARCHAR(255) null, primary key (Id) ) alter table UsersToRoles add constraint FK_RoleInUser foreign key (RoleId) references [Role] alter table UsersToRoles add constraint FK_UserInRole foreign key (UserId) references [User] Test available in NHibernate.Test.NHSpecificTest.NH1270 > SchemaExport using foreign key name for 'inverse' side of ManyToMany > -------------------------------------------------------------------- > > Key: NH-1270 > URL: http://216.121.112.228/browse/NH-1270 > Project: NHibernate > Issue Type: Improvement > Components: Toolset > Affects Versions: 2.1.0.Alpha1 > Reporter: Fried Hoeben > Priority: Minor > > At the moment one can specifiy a foreign key name (using NHibernate attributes) for the side of a ManyToMany relation marked as inverse. But this name is not used by SchemaExport, instead of foreign key with a generated name is created. > Please change this behavior to use the name provided, instead of generating a key name. -- 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: Andrei A. (JIRA) <nh...@gm...> - 2011-05-20 21:20:43
|
[ http://216.121.112.228/browse/NH-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21139#action_21139 ] Andrei Alecu commented on NH-2404: ---------------------------------- Oops, NH-2690. > Future queries crash (MultiQuery) when using projection queries using hql + result transformer or the linq provider (which compiles into hql) > ---------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2404 > URL: http://216.121.112.228/browse/NH-2404 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.Beta2, 3.0.0.CR1 > Reporter: Olli Ryhänen > Priority: Major > Fix For: 3.2.0Beta1 > > Attachments: NH2404_Test.patch > > > Using HQL query to create a projection and then choosing a result transformer to it crashes when using .Future<DTO> method to turn it into a multi-query query with exception: > System.ArgumentException: The value "System.Object[]" is not of type "DTO" and cannot be used in this generic collection. > The same is true when using the new .ToFuture<DTO>() support added for the linq provider and it crashes in the same location of the multi-query implementation. > Example code that works: > var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") > .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) > .List<TestEntityDto>(); > Same query using future support causes the crash: > var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") > .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) > .Future<TestEntityDto>(); -- 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: Andrei A. (JIRA) <nh...@gm...> - 2011-05-20 21:20:36
|
[ http://216.121.112.228/browse/NH-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21138#action_21138 ] Andrei Alecu commented on NH-2404: ---------------------------------- Think it was NH2690 :) > Future queries crash (MultiQuery) when using projection queries using hql + result transformer or the linq provider (which compiles into hql) > ---------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2404 > URL: http://216.121.112.228/browse/NH-2404 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.Beta2, 3.0.0.CR1 > Reporter: Olli Ryhänen > Priority: Major > Fix For: 3.2.0Beta1 > > Attachments: NH2404_Test.patch > > > Using HQL query to create a projection and then choosing a result transformer to it crashes when using .Future<DTO> method to turn it into a multi-query query with exception: > System.ArgumentException: The value "System.Object[]" is not of type "DTO" and cannot be used in this generic collection. > The same is true when using the new .ToFuture<DTO>() support added for the linq provider and it crashes in the same location of the multi-query implementation. > Example code that works: > var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") > .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) > .List<TestEntityDto>(); > Same query using future support causes the crash: > var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") > .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) > .Future<TestEntityDto>(); -- 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-20 19:46:04
|
List with cascade delete orphan and remove/insert of same item fails -------------------------------------------------------------------- Key: NH-2721 URL: http://216.121.112.228/browse/NH-2721 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.2.0Beta1 Reporter: Patrick Earl Assignee: Patrick Earl -- 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-20 16:48:07
|
[ http://216.121.112.228/browse/NH-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21137#action_21137 ] Fabio Maulo commented on NH-2366: --------------------------------- Test committed in the trunk. > Patch for StatefulPersistenceContext for non-lazy collections (HHH-2862) > ------------------------------------------------------------------------ > > Key: NH-2366 > URL: http://216.121.112.228/browse/NH-2366 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Denis Bykov > Priority: Major > Attachments: NH-2366.test.patch, nh_2.1.2_StatefulPersistenceContext.patch > > > This patch fix problem, similar to described in HHH-2862 ("Collection is not associated with any session exception when doing an eager fetch on a non-unique collection." http://opensource.atlassian.com/projects/hibernate/browse/HHH-2862) > ----------------------------------------------------- > Copied description from HHH-2682: > It is basically caused by having an eager collection where the key of the collection is not unique in the results. > The code works as follows in CollectionType.getCollection(): > .... > persistenceContext.addUninitializedCollection( persister, collection, key ); > // some collections are not lazy: > if ( initializeImmediately( entityMode ) ) { session.initializeCollection( collection, false ); } > else if ( !persister.isLazy() ) { persistenceContext.addNonLazyCollection( collection ); } > if ( hasHolder( entityMode ) ) { session.getPersistenceContext().addCollectionHolder( collection ); } > if persistenceContext.addUninitializedCollection() detects that the collection with the given key has already been added it clears the session on the old instance of the collection (sets it to null). However, that collection has already been added to the persistence context by an earlier call to this method. So later when StatefulPersistenceContext.initializeNonLazyCollections() is called it iterates through all of the collections in the persistence context (including those which have had their session set to null by addUninitializedCollection()), calling forceInitialization() which throws a 'collection is not associated with any session' exception. -- 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-20 16:09:56
|
[ http://216.121.112.228/browse/NH-2206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2206. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0CR1 > Cast is not supported by the new Linq provider > ---------------------------------------------- > > Key: NH-2206 > URL: http://216.121.112.228/browse/NH-2206 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.Alpha1 > Reporter: Diego Mijelshon > Priority: Major > Fix For: 3.2.0CR1 > > Attachments: ResultCastTest.cs > > > Executing the attached test results in the following exception: > System.NotSupportedException: The CastResultOperator result operator is not current supported > This works without problems with the old provider. -- 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-20 15:36:56
|
[ http://216.121.112.228/browse/NH-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2657. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0CR1 > OrderBy After Cast Not Working > ------------------------------ > > Key: NH-2657 > URL: http://216.121.112.228/browse/NH-2657 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Lee Timmins > Priority: Minor > Fix For: 3.2.0CR1 > > > The following test: > [TestMethod] > public void Cast_OrderBy() { > var result = _session.Query<CommentUser>() > .Cast<Comment>() > .OrderBy(c => c.CommentID) > .ToList(); > Assert.AreEqual(4, result.Count); > } > Fails in the latest Linq provider but worked fine in the old one. -- 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-20 15:00:56
|
[ http://216.121.112.228/browse/NH-2701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2701. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0CR1 > Cannot use Linq Skip() in conjunction with FetchMany and ToFuture > ----------------------------------------------------------------- > > Key: NH-2701 > URL: http://216.121.112.228/browse/NH-2701 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Alpha3 > Reporter: Andrei Alecu > Fix For: 3.2.0CR1 > > Attachments: nh2701 failing test.patch > > > Using .Skip() in conjunction with a query that uses FetchMany/Fetch() and .ToFuture() results in the following error: > System.ArgumentException : Object of type 'System.Collections.ArrayList' cannot be converted to type 'System.Collections.Generic.IEnumerable`1[System.Object]'. > Failing unit test attached. -- 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-05-20 14:38:11
|
[ http://216.121.112.228/browse/NH-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21136#action_21136 ] Ricardo Peres commented on NH-2711: ----------------------------------- It wasn't a joke, just a mistake... sorry about that. I agree with you, my point of view is that standard SQL functions should be placed in Dialect.cs. > Support COALESCE as HQL function > -------------------------------- > > Key: NH-2711 > URL: http://216.121.112.228/browse/NH-2711 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > SQL standard defines the COALESCE operator, which should be implemented in most DBs. HQL should implement it. > I know we can always define it in a custom Dialect, but since this is standard, I think it should be supported by the core. -- 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: Stefan P. (JIRA) <nh...@gm...> - 2011-05-20 14:35:57
|
Exception using PostgreSQL with server-side prepared statements and identity columns ------------------------------------------------------------------------------------ Key: NH-2720 URL: http://216.121.112.228/browse/NH-2720 Project: NHibernate Issue Type: Bug Components: DataProviders / Dialects Affects Versions: 3.1.0 Reporter: Stefan Podskubka Priority: Minor I did not write a test case for this issue because I think this scenario is not supported by the test framework. .NET Framework version: 3.5 Database: PostgreSQL 8.3.3 Dialect: NHibernate.Dialect.PostgreSQL82Dialect Driver: NHibernate.Driver.NpgsqlDriver (Npgsql.dll version 2.0.11) Additionally I have set this configuration property: <property name="prepare_sql">true</property> This issue is related to NH-2267, it has to do with server-side prepared statements. I need prepared statements because I am writing large byte arrays (up to 50 MB) into the database, this is only possible and performant using server-side prepared statements (otherwise the Npgsql driver is filling a large amount of memory - hundreds of megabytes - with string objects when it constructs the SQL string on the client side, I have analyzed this with Microsoft's CLRProfiler). The problem lies in using server-side prepared statements with identity columns. These are the three properties that are relevant to the problem: PostgreSQL81Dialect.IdentitySelectString returns "select lastval()" PostgreSQL81Dialect.SupportsInsertSelectIdentity returns true (which tells NHibernate to issue the IdentitySelectString in the same command as the INSERT statement) NpgsqlDriver.SupportsPreparingCommands returns true (which enables NHibernate to use server-side prepared statements at all) If NHibernate issues an INSERT statement with identity columns it looks like this because of the above properties: INSERT INTO tab1(...);select lastval(); This is no problem when server-side prepared statements are not used. But if server-side prepared statements are used, PostgreSQL returns an error which apparently was the reason why prepared statements were not enabled before on the NpgsqlDriver. This was the comment in NpgsqlDriver.cs with the same exception I am receiving: // NOTE: Npgsql1.0 and 2.0-preview apparently doesn't correctly support prepared commands. // The following exception is thrown on insert statements: // Npgsql.NpgsqlException : ERROR: 42601: cannot insert multiple commands into a prepared statement I have successfully worked around this issue by changing the property PostgreSQL81Dialect.SupportsInsertSelectIdentity to return "false". In this case the "select lastval()" command was issued as a seperate command and everything worked fine. I think this problem is also closely related to the tickets NH-1316 and NH-2204, if those can be fixed with the suggested "returning id" syntax, this may not be an issue anymore. -- 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-20 14:16:08
|
[ http://216.121.112.228/browse/NH-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2671. --------------------------- Resolution: Not an Issue Please use nhuser group for question. > Fetch cannot be last statement > ------------------------------ > > Key: NH-2671 > URL: http://216.121.112.228/browse/NH-2671 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: michael s > Priority: Major > > I am using WCF data services in conjuntion with Linq and received the exception whenever I try to use fetch to support the OData expand protocol. > Typical query: > from u in Products.Expand("Categories") > select u > Service Impl: > public IQueryable<Product> Products > { > get > { > return _session.Query<Product>().Fetch(c => c.Categories); > } > } > This issue was reported fixed. The alternative to append ToList and AsQueryable is not appropriate as it will lead to filtering in memory as opposed to the database. > 2011-04-24 21:24:07,353 [7] ERROR - System.Data.Services.DataServiceException: Not Implemented ---> System.NotSupportedException: Specified method is not s > upported. > at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) > at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.Process(IASTNode tree) > at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process() > at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process(IASTNode ast, ISessionFactoryImplementor factory) > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, ID > ictionary`2 filters, ISessionFactoryImplementor factory) > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, > Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean sh > allow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDict > ionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters > , ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at Remotion.Data.Linq.QueryableBase`1.GetEnumerator() > at System.Data.Services.Providers.BasicExpandProvider.ExpandedQueryable`1.GetEnumerator() > at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) > --- End of inner exception stack trace --- > at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) > at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService) > at System.Data.Services.DataService`1.HandleRequest() -- 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-20 14:16:03
|
[ http://216.121.112.228/browse/NH-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21134#action_21134 ] Fabio Maulo commented on NH-2671: --------------------------------- Is "Categories" a collection ? > Fetch cannot be last statement > ------------------------------ > > Key: NH-2671 > URL: http://216.121.112.228/browse/NH-2671 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: michael s > Priority: Major > > I am using WCF data services in conjuntion with Linq and received the exception whenever I try to use fetch to support the OData expand protocol. > Typical query: > from u in Products.Expand("Categories") > select u > Service Impl: > public IQueryable<Product> Products > { > get > { > return _session.Query<Product>().Fetch(c => c.Categories); > } > } > This issue was reported fixed. The alternative to append ToList and AsQueryable is not appropriate as it will lead to filtering in memory as opposed to the database. > 2011-04-24 21:24:07,353 [7] ERROR - System.Data.Services.DataServiceException: Not Implemented ---> System.NotSupportedException: Specified method is not s > upported. > at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) > at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.Process(IASTNode tree) > at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process() > at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process(IASTNode ast, ISessionFactoryImplementor factory) > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, ID > ictionary`2 filters, ISessionFactoryImplementor factory) > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, > Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean sh > allow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDict > ionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters > , ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at Remotion.Data.Linq.QueryableBase`1.GetEnumerator() > at System.Data.Services.Providers.BasicExpandProvider.ExpandedQueryable`1.GetEnumerator() > at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) > --- End of inner exception stack trace --- > at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) > at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService) > at System.Data.Services.DataService`1.HandleRequest() -- 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-20 14:10:56
|
[ http://216.121.112.228/browse/NH-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2711: ---------------------------- Summary: Support COALESCE as HQL function (was: Support COALESCE in HQL) The parser does not need to be changed. Coalesce can be added as standard HQL-function, as 'extract', 'cast' and so on (see Dialect.cs) and then each dialect can override the behavior where needed. > Support COALESCE as HQL function > -------------------------------- > > Key: NH-2711 > URL: http://216.121.112.228/browse/NH-2711 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > SQL standard defines the COALESCE operator, which should be implemented in most DBs. HQL should implement it. > I know we can always define it in a custom Dialect, but since this is standard, I think it should be supported by the core. -- 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-20 14:03:58
|
[ http://216.121.112.228/browse/NH-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2712: ---------------------------- Priority: Minor (was: Major) > queryover doesn't support enums in VB.NET > ----------------------------------------- > > Key: NH-2712 > URL: http://216.121.112.228/browse/NH-2712 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.Beta2 > Reporter: Matthew Beer > Assignee: Patrick Earl > Priority: Minor > Fix For: 3.1.0 > > > Comparing enums in a Linq query with VB.NET throws a NotSupportedException: > Return (From invoice In session.Query(Of Invoice)() > Where invoice.Payment.ElectronicInvoiceStatus = ElectronicInvoiceStatus.Unpaid > Select invoice).Any() > Message: ConvertChecked([-1].Payment.ElectronicInvoiceStatus) > Stack Trace: > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitUnaryExpression(UnaryExpression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitBinaryExpression(BinaryExpression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.Visit(Expression expression, VisitorParameters parameters) > at NHibernate.Linq.Visitors.QueryModelVisitor.VisitWhereClause(WhereClause whereClause, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.Clauses.WhereClause.Accept(IQueryModelVisitor visitor, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitBodyClauses(ObservableCollection`1 bodyClauses, QueryModel queryModel) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel) > at NHibernate.Linq.Visitors.QueryModelVisitor.Visit() > at NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel queryModel, VisitorParameters parameters, Boolean root) > at NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor sessionFactory) > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at System.Linq.Queryable.Any[TSource](IQueryable`1 source) -- 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-20 13:59:06
|
[ http://216.121.112.228/browse/NH-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2708. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0CR1 > Cast<>() with a where clause fails with a NotSupportedException > --------------------------------------------------------------- > > Key: NH-2708 > URL: http://216.121.112.228/browse/NH-2708 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Sergey Karpushev > Priority: Major > Fix For: 3.2.0CR1 > > Attachments: cast.patch > > > Issue similar to NH-2375 > Patch with a test and fix attached. > Test 'NHibernate.Test.Linq.WhereTests.CastWithWhere' failed: System.NotSupportedException : Specified method is not supported. > Hql\Ast\ANTLR\PolymorphicQuerySourceDetector.cs(61,0): at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) > Hql\Ast\ANTLR\PolymorphicQuerySourceDetector.cs(27,0): at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.Process(IASTNode tree) > Hql\Ast\ANTLR\AstPolymorphicProcessor.cs(30,0): at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process() > Hql\Ast\ANTLR\AstPolymorphicProcessor.cs(24,0): at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process(IASTNode ast, ISessionFactoryImplementor factory) > Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(33,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(27,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(34,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(23,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(17,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\QueryPlanCache.cs(88,0): at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > Impl\AbstractSessionImpl.cs(312,0): at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > Impl\AbstractSessionImpl.cs(268,0): at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > Linq\NhQueryProvider.cs(43,0): at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > Linq\NhQueryProvider.cs(26,0): at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > Linq\NhQueryProvider.cs(103,0): at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) > Linq\WhereTests.cs(554,0): at NHibernate.Test.Linq.WhereTests.CastWithWhere() -- 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-20 13:58:57
|
[ http://216.121.112.228/browse/NH-2717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2717. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0CR1 > Count() after Cast<>() causes InvalidOperationException > ------------------------------------------------------- > > Key: NH-2717 > URL: http://216.121.112.228/browse/NH-2717 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Sergey Karpushev > Priority: Major > Fix For: 3.2.0CR1 > > Attachments: CastCount.patch > > > patch for with a test and fix attached > Test 'NHibernate.Test.Linq.ByMethod.CastTests.CastCount' failed: System.InvalidOperationException : No coercion operator is defined between types 'System.Int32' and 'NHibernate.DomainModel.Northwind.Entities.Animal'. > at System.Linq.Expressions.Expression.GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType) > at System.Linq.Expressions.Expression.Convert(Expression expression, Type type) > at Remotion.Data.Linq.Clauses.ResultOperators.CastResultOperator.GetNewItemExpression(Expression inputItemExpression) > at Remotion.Data.Linq.Clauses.ResultOperators.CastResultOperator.GetOutputDataInfo(IStreamedDataInfo inputInfo) > Linq\Visitors\QueryModelVisitor.cs(133,0): at NHibernate.Linq.Visitors.QueryModelVisitor.VisitResultOperator(ResultOperatorBase resultOperator, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.Clauses.ResultOperatorBase.Accept(IQueryModelVisitor visitor, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitResultOperators(ObservableCollection`1 resultOperators, QueryModel queryModel) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel) > Linq\Visitors\QueryModelVisitor.cs(108,0): at NHibernate.Linq.Visitors.QueryModelVisitor.Visit() > Linq\Visitors\QueryModelVisitor.cs(59,0): at NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel queryModel, VisitorParameters parameters, Boolean root) > Linq\NhLinqExpression.cs(67,0): at NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor sessionFactory) > Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(27,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(34,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(23,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(17,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\QueryPlanCache.cs(88,0): at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > Impl\AbstractSessionImpl.cs(312,0): at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > Impl\AbstractSessionImpl.cs(268,0): at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > Linq\NhQueryProvider.cs(43,0): at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > Linq\NhQueryProvider.cs(26,0): at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > Linq\NhQueryProvider.cs(103,0): at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at System.Linq.Queryable.Count[TSource](IQueryable`1 source) > Linq\ByMethod\CastTests.cs(36,0): at NHibernate.Test.Linq.ByMethod.CastTests.CastCount() -- 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: Vahid N. (JIRA) <nh...@gm...> - 2011-05-20 12:37:04
|
[ http://216.121.112.228/browse/NH-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21132#action_21132 ] Vahid Nasiri commented on NH-2519: ---------------------------------- Hello, What's you idea about it? Also there is a implementation for "select top(n) ..." in sql server dialects which can be used for sql ce too. > SQL-CE & LINQ to NH 3.0 > ----------------------- > > Key: NH-2519 > URL: http://216.121.112.228/browse/NH-2519 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Vahid Nasiri > Priority: Minor > Attachments: NHibernate.Test.01.27.2011.zip, sql_ce_funcs.zip > > > I've attached a test project to show some serious problems with LINQ to NH 3.0 & SQL-CE. -- 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: Anupam M. (JIRA) <nh...@gm...> - 2011-05-20 06:53:04
|
[ http://216.121.112.228/browse/NH-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21131#action_21131 ] Anupam Mishra commented on NH-2713: ----------------------------------- Please change the priority to Major > When calling Oracle stored procedure with Custom Type as parameter , NHibernate is throwing exception. where as with MS SQL Server 2008 it is working. > ------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2713 > URL: http://216.121.112.228/browse/NH-2713 > Project: NHibernate > Issue Type: Bug > Components: Core, DataProviders / Dialects > Affects Versions: 3.0.0.GA > Reporter: Anupam Mishra > Attachments: Oracle Exception.txt > > > Please check the attached Exception while calling Oracle Stored Procedure . > Class which implement IType > using System; > using System.Collections.Generic; > using System.Text; > using NHibernate.Type; > using NHibernate.SqlTypes; > using System.Data; > using NHibernate; > using System.Data.SqlClient; > using Oracle.DataAccess.Client; > namespace DomainObject > { > public class Sql2008Structured : IType > { > private static readonly SqlType[] x = new[] { new SqlType(DbType.Object) }; > public SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) > { > return x; > } > public bool IsCollectionType > { > get { return true; } > } > public int GetColumnSpan(NHibernate.Engine.IMapping mapping) > { > return 1; > } > > #region IType Members > public int Compare(object x, object y, EntityMode? entityMode) > { > throw new NotImplementedException(); > } > public object DeepCopy(object val, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public object FromXMLNode(System.Xml.XmlNode xml, NHibernate.Engine.IMapping factory) > { > throw new NotImplementedException(); > } > public int GetHashCode(object x, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public int GetHashCode(object x, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public object Hydrate(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public bool IsAnyType > { > get { throw new NotImplementedException(); } > } > public bool IsAssociationType > { > get { throw new NotImplementedException(); } > } > public bool IsComponentType > { > get { throw new NotImplementedException(); } > } > public bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsEntityType > { > get { throw new NotImplementedException(); } > } > public bool IsEqual(object x, object y, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public bool IsEqual(object x, object y, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public bool IsModified(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsMutable > { > get { throw new NotImplementedException(); } > } > public bool IsSame(object x, object y, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public bool IsXMLElement > { > get { throw new NotImplementedException(); } > } > public string Name > { > get { throw new NotImplementedException(); } > } > public object NullSafeGet(IDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public object NullSafeGet(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void NullSafeSet(IDbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) > { > var s = st as SqlCommand; > if (s != null) > { > s.Parameters[index].SqlDbType = SqlDbType.Structured; > s.Parameters[index].TypeName = "EmployeeType"; > s.Parameters[index].Value = value; > } > else > { > var o = st as OracleCommand; > o.Parameters[index].OracleDbType = OracleDbType.Array; > o.Parameters[index].UdtTypeName = "TESTTYPE"; > o.Parameters[index].Value = value; > } > } > public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, ForeignKeyDirection foreignKeyDirection) > { > throw new NotImplementedException(); > } > public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) > { > throw new NotImplementedException(); > } > public object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public Type ReturnedClass > { > get { throw new NotImplementedException(); } > } > public object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void SetToXMLNode(System.Xml.XmlNode node, object value, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) > { > throw new NotImplementedException(); > } > public string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > #endregion > #region ICacheAssembler Members > public object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void BeforeAssemble(object cached, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > #endregion > #region IType Members > public void NullSafeSet(IDbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) > { > var s = st as SqlCommand; > if (s != null) > { > s.Parameters[index].SqlDbType = SqlDbType.Structured; > s.Parameters[index].TypeName = "EmployeeType"; > s.Parameters[index].Value = value; > } > else > { > var o = st as OracleCommand; > o.Parameters[index].OracleDbType = OracleDbType.Array; > o.Parameters[index].UdtTypeName = "TESTTYPE"; > o.Parameters[index].Value = value; > } > } > #endregion > } > public static class StructuredExtensions > { > private static readonly Sql2008Structured structured = new Sql2008Structured(); > public static IQuery SetStructured(this IQuery query, string name, DataTable dt) > { > return query.SetParameter(name, dt, structured); > } > public static IQuery SetOracleStructured(this IQuery query, string name, Object[] dt) > { > return query.SetParameter(name, dt, structured); > } > } > } > Type defined in Oracle > create or replace > TYPE employeeType AS OBJECT (employeeId INT, employeeName VARCHAR2 (50)); > *************** > create or replace > TYPE TESTTYPE AS TABLE OF EMPLOYEETYPE; > Stored Procedure > create or replace PROCEDURE TESTCUSTOMEMPLOYEE (PARAM1 OUT SYS_REFCURSOR,PARAM IN TESTTYPE) IS > BEGIN > open PARAM1 for SELECT EMP_ID,EMP_NAME,EMP_PASSWORD,TEAM_ASSOCIATED_WITH,IS_CAPTAIN,NO_OF_MOM,BALANCE FROM employee; > END; -- 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-19 16:02:00
|
[ http://216.121.112.228/browse/NH-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2719. --------------------------- Resolution: Duplicate Perhaps you may give an explication about the reason you are duplicating your own issue NH-2713 you have filed yesterday. > When calling Oracle stored procedure with Custom Type as parameter , NHibernate is throwing exception. where as with MS SQL Server 2008 it is working. > ------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2719 > URL: http://216.121.112.228/browse/NH-2719 > Project: NHibernate > Issue Type: Bug > Components: Core, Mapping by-code > Affects Versions: 3.0.0.GA > Reporter: Anupam Mishra > Priority: Major > Attachments: Oracle Exception.txt > > > Please check the attached Exception while calling Oracle Stored Procedure . > Class which implement IType > using System; > using System.Collections.Generic; > using System.Text; > using NHibernate.Type; > using NHibernate.SqlTypes; > using System.Data; > using NHibernate; > using System.Data.SqlClient; > using Oracle.DataAccess.Client; > namespace DomainObject > { > public class Sql2008Structured : IType > { > private static readonly SqlType[] x = new[] { new SqlType(DbType.Object) }; > public SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) > { > return x; > } > public bool IsCollectionType > { > get { return true; } > } > public int GetColumnSpan(NHibernate.Engine.IMapping mapping) > { > return 1; > } > > #region IType Members > public int Compare(object x, object y, EntityMode? entityMode) > { > throw new NotImplementedException(); > } > public object DeepCopy(object val, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public object FromXMLNode(System.Xml.XmlNode xml, NHibernate.Engine.IMapping factory) > { > throw new NotImplementedException(); > } > public int GetHashCode(object x, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public int GetHashCode(object x, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public object Hydrate(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public bool IsAnyType > { > get { throw new NotImplementedException(); } > } > public bool IsAssociationType > { > get { throw new NotImplementedException(); } > } > public bool IsComponentType > { > get { throw new NotImplementedException(); } > } > public bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsEntityType > { > get { throw new NotImplementedException(); } > } > public bool IsEqual(object x, object y, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public bool IsEqual(object x, object y, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public bool IsModified(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsMutable > { > get { throw new NotImplementedException(); } > } > public bool IsSame(object x, object y, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public bool IsXMLElement > { > get { throw new NotImplementedException(); } > } > public string Name > { > get { throw new NotImplementedException(); } > } > public object NullSafeGet(IDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public object NullSafeGet(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void NullSafeSet(IDbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) > { > var s = st as SqlCommand; > if (s != null) > { > s.Parameters[index].SqlDbType = SqlDbType.Structured; > s.Parameters[index].TypeName = "EmployeeType"; > s.Parameters[index].Value = value; > } > else > { > var o = st as OracleCommand; > o.Parameters[index].OracleDbType = OracleDbType.Array; > o.Parameters[index].UdtTypeName = "TESTTYPE"; > o.Parameters[index].Value = value; > } > } > public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, ForeignKeyDirection foreignKeyDirection) > { > throw new NotImplementedException(); > } > public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) > { > throw new NotImplementedException(); > } > public object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public Type ReturnedClass > { > get { throw new NotImplementedException(); } > } > public object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void SetToXMLNode(System.Xml.XmlNode node, object value, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) > { > throw new NotImplementedException(); > } > public string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > #endregion > #region ICacheAssembler Members > public object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void BeforeAssemble(object cached, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > #endregion > #region IType Members > public void NullSafeSet(IDbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) > { > var s = st as SqlCommand; > if (s != null) > { > s.Parameters[index].SqlDbType = SqlDbType.Structured; > s.Parameters[index].TypeName = "EmployeeType"; > s.Parameters[index].Value = value; > } > else > { > var o = st as OracleCommand; > o.Parameters[index].OracleDbType = OracleDbType.Array; > o.Parameters[index].UdtTypeName = "TESTTYPE"; > o.Parameters[index].Value = value; > } > } > #endregion > } > public static class StructuredExtensions > { > private static readonly Sql2008Structured structured = new Sql2008Structured(); > public static IQuery SetStructured(this IQuery query, string name, DataTable dt) > { > return query.SetParameter(name, dt, structured); > } > public static IQuery SetOracleStructured(this IQuery query, string name, Object[] dt) > { > return query.SetParameter(name, dt, structured); > } > } > } > Type defined in Oracle > create or replace > TYPE employeeType AS OBJECT (employeeId INT, employeeName VARCHAR2 (50)); > *************** > create or replace > TYPE TESTTYPE AS TABLE OF EMPLOYEETYPE; > Stored Procedure > create or replace PROCEDURE TESTCUSTOMEMPLOYEE (PARAM1 OUT SYS_REFCURSOR,PARAM IN TESTTYPE) IS > BEGIN > open PARAM1 for SELECT EMP_ID,EMP_NAME,EMP_PASSWORD,TEAM_ASSOCIATED_WITH,IS_CAPTAIN,NO_OF_MOM,BALANCE FROM employee; > END; -- 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-19 16:00:02
|
[ http://216.121.112.228/browse/NH-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2711: ---------------------------- Affects Version/s: (was: 3.2.0Beta1) (was: 3.2.0Alpha3) (was: 3.2.0Alpha2) (was: 3.2.0Alpha1) (was: 3.0.0.GA) (was: 3.0.0.CR1) (was: 3.0.0.Beta2) (was: 3.0.0.Beta1) (was: 3.0.0.Alpha3) (was: 3.0.0.Alpha2) (was: 2.1.2.GA) (was: 2.1.1.GA) (was: 3.0.0.Alpha1) (was: 2.0.1.GA) (was: 1.2.1) Please stop the joke of "Affected version" (2nd times). A new feature is a new feature you don't have to specify that the affected version are all already released versions including even all alphas. > Support COALESCE in HQL > ----------------------- > > Key: NH-2711 > URL: http://216.121.112.228/browse/NH-2711 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > SQL standard defines the COALESCE operator, which should be implemented in most DBs. HQL should implement it. > I know we can always define it in a custom Dialect, but since this is standard, I think it should be supported by the core. -- 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-19 15:57:52
|
[ http://216.121.112.228/browse/NH-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2719: ---------------------------- Priority: Major (was: Critical) > When calling Oracle stored procedure with Custom Type as parameter , NHibernate is throwing exception. where as with MS SQL Server 2008 it is working. > ------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2719 > URL: http://216.121.112.228/browse/NH-2719 > Project: NHibernate > Issue Type: Bug > Components: Core, Mapping by-code > Affects Versions: 3.0.0.GA > Reporter: Anupam Mishra > Priority: Major > Attachments: Oracle Exception.txt > > > Please check the attached Exception while calling Oracle Stored Procedure . > Class which implement IType > using System; > using System.Collections.Generic; > using System.Text; > using NHibernate.Type; > using NHibernate.SqlTypes; > using System.Data; > using NHibernate; > using System.Data.SqlClient; > using Oracle.DataAccess.Client; > namespace DomainObject > { > public class Sql2008Structured : IType > { > private static readonly SqlType[] x = new[] { new SqlType(DbType.Object) }; > public SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) > { > return x; > } > public bool IsCollectionType > { > get { return true; } > } > public int GetColumnSpan(NHibernate.Engine.IMapping mapping) > { > return 1; > } > > #region IType Members > public int Compare(object x, object y, EntityMode? entityMode) > { > throw new NotImplementedException(); > } > public object DeepCopy(object val, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public object FromXMLNode(System.Xml.XmlNode xml, NHibernate.Engine.IMapping factory) > { > throw new NotImplementedException(); > } > public int GetHashCode(object x, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public int GetHashCode(object x, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public object Hydrate(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public bool IsAnyType > { > get { throw new NotImplementedException(); } > } > public bool IsAssociationType > { > get { throw new NotImplementedException(); } > } > public bool IsComponentType > { > get { throw new NotImplementedException(); } > } > public bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsEntityType > { > get { throw new NotImplementedException(); } > } > public bool IsEqual(object x, object y, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public bool IsEqual(object x, object y, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public bool IsModified(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public bool IsMutable > { > get { throw new NotImplementedException(); } > } > public bool IsSame(object x, object y, EntityMode entityMode) > { > throw new NotImplementedException(); > } > public bool IsXMLElement > { > get { throw new NotImplementedException(); } > } > public string Name > { > get { throw new NotImplementedException(); } > } > public object NullSafeGet(IDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public object NullSafeGet(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void NullSafeSet(IDbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) > { > var s = st as SqlCommand; > if (s != null) > { > s.Parameters[index].SqlDbType = SqlDbType.Structured; > s.Parameters[index].TypeName = "EmployeeType"; > s.Parameters[index].Value = value; > } > else > { > var o = st as OracleCommand; > o.Parameters[index].OracleDbType = OracleDbType.Array; > o.Parameters[index].UdtTypeName = "TESTTYPE"; > o.Parameters[index].Value = value; > } > } > public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, ForeignKeyDirection foreignKeyDirection) > { > throw new NotImplementedException(); > } > public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) > { > throw new NotImplementedException(); > } > public object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public Type ReturnedClass > { > get { throw new NotImplementedException(); } > } > public object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void SetToXMLNode(System.Xml.XmlNode node, object value, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > public bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) > { > throw new NotImplementedException(); > } > public string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) > { > throw new NotImplementedException(); > } > #endregion > #region ICacheAssembler Members > public object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > public void BeforeAssemble(object cached, NHibernate.Engine.ISessionImplementor session) > { > throw new NotImplementedException(); > } > public object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) > { > throw new NotImplementedException(); > } > #endregion > #region IType Members > public void NullSafeSet(IDbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) > { > var s = st as SqlCommand; > if (s != null) > { > s.Parameters[index].SqlDbType = SqlDbType.Structured; > s.Parameters[index].TypeName = "EmployeeType"; > s.Parameters[index].Value = value; > } > else > { > var o = st as OracleCommand; > o.Parameters[index].OracleDbType = OracleDbType.Array; > o.Parameters[index].UdtTypeName = "TESTTYPE"; > o.Parameters[index].Value = value; > } > } > #endregion > } > public static class StructuredExtensions > { > private static readonly Sql2008Structured structured = new Sql2008Structured(); > public static IQuery SetStructured(this IQuery query, string name, DataTable dt) > { > return query.SetParameter(name, dt, structured); > } > public static IQuery SetOracleStructured(this IQuery query, string name, Object[] dt) > { > return query.SetParameter(name, dt, structured); > } > } > } > Type defined in Oracle > create or replace > TYPE employeeType AS OBJECT (employeeId INT, employeeName VARCHAR2 (50)); > *************** > create or replace > TYPE TESTTYPE AS TABLE OF EMPLOYEETYPE; > Stored Procedure > create or replace PROCEDURE TESTCUSTOMEMPLOYEE (PARAM1 OUT SYS_REFCURSOR,PARAM IN TESTTYPE) IS > BEGIN > open PARAM1 for SELECT EMP_ID,EMP_NAME,EMP_PASSWORD,TEAM_ASSOCIATED_WITH,IS_CAPTAIN,NO_OF_MOM,BALANCE FROM employee; > END; -- 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-19 15:55:59
|
[ http://216.121.112.228/browse/NH-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21128#action_21128 ] Fabio Maulo commented on NH-2657: --------------------------------- See linked issue for possible patch > OrderBy After Cast Not Working > ------------------------------ > > Key: NH-2657 > URL: http://216.121.112.228/browse/NH-2657 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Lee Timmins > Priority: Minor > > The following test: > [TestMethod] > public void Cast_OrderBy() { > var result = _session.Query<CommentUser>() > .Cast<Comment>() > .OrderBy(c => c.CommentID) > .ToList(); > Assert.AreEqual(4, result.Count); > } > Fails in the latest Linq provider but worked fine in the old one. -- 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-19 15:53:56
|
[ http://216.121.112.228/browse/NH-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2718. --------------------------- Resolution: Duplicate NH-2657 > .Where().Cast<>().OrderBy() query causes NotSupportedException > -------------------------------------------------------------- > > Key: NH-2718 > URL: http://216.121.112.228/browse/NH-2718 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Sergey Karpushev > Attachments: CastWhere.patch > > > patch for with a test and fix attached > patch includes my fix for NH-2708 > Test 'NHibernate.Test.Linq.ByMethod.CastTests.CastWhereFirstOrDefault' failed: System.NotSupportedException : Specified method is not supported. > Hql\Ast\ANTLR\PolymorphicQuerySourceDetector.cs(61,0): at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) > Hql\Ast\ANTLR\PolymorphicQuerySourceDetector.cs(27,0): at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.Process(IASTNode tree) > Hql\Ast\ANTLR\AstPolymorphicProcessor.cs(30,0): at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process() > Hql\Ast\ANTLR\AstPolymorphicProcessor.cs(24,0): at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process(IASTNode ast, ISessionFactoryImplementor factory) > Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(33,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(27,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(34,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(23,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\HQLExpressionQueryPlan.cs(17,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > Engine\Query\QueryPlanCache.cs(88,0): at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > Impl\AbstractSessionImpl.cs(312,0): at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > Impl\AbstractSessionImpl.cs(268,0): at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > Linq\NhQueryProvider.cs(43,0): at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > Linq\NhQueryProvider.cs(26,0): at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > Linq\NhQueryProvider.cs(103,0): at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) > Linq\ByMethod\CastTests.cs(16,0): at NHibernate.Test.Linq.ByMethod.CastTests.CastWhereFirstOrDefault() -- 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: Anupam M. (JIRA) <nh...@gm...> - 2011-05-19 13:51:53
|
When calling Oracle stored procedure with Custom Type as parameter , NHibernate is throwing exception. where as with MS SQL Server 2008 it is working. ------------------------------------------------------------------------------------------------------------------------------------------------------- Key: NH-2719 URL: http://216.121.112.228/browse/NH-2719 Project: NHibernate Issue Type: Bug Components: Core, Mapping by-code Affects Versions: 3.0.0.GA Reporter: Anupam Mishra Priority: Critical Attachments: Oracle Exception.txt Please check the attached Exception while calling Oracle Stored Procedure . Class which implement IType using System; using System.Collections.Generic; using System.Text; using NHibernate.Type; using NHibernate.SqlTypes; using System.Data; using NHibernate; using System.Data.SqlClient; using Oracle.DataAccess.Client; namespace DomainObject { public class Sql2008Structured : IType { private static readonly SqlType[] x = new[] { new SqlType(DbType.Object) }; public SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) { return x; } public bool IsCollectionType { get { return true; } } public int GetColumnSpan(NHibernate.Engine.IMapping mapping) { return 1; } #region IType Members public int Compare(object x, object y, EntityMode? entityMode) { throw new NotImplementedException(); } public object DeepCopy(object val, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public object FromXMLNode(System.Xml.XmlNode xml, NHibernate.Engine.IMapping factory) { throw new NotImplementedException(); } public int GetHashCode(object x, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public int GetHashCode(object x, EntityMode entityMode) { throw new NotImplementedException(); } public IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public object Hydrate(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public bool IsAnyType { get { throw new NotImplementedException(); } } public bool IsAssociationType { get { throw new NotImplementedException(); } } public bool IsComponentType { get { throw new NotImplementedException(); } } public bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public bool IsEntityType { get { throw new NotImplementedException(); } } public bool IsEqual(object x, object y, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public bool IsEqual(object x, object y, EntityMode entityMode) { throw new NotImplementedException(); } public bool IsModified(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public bool IsMutable { get { throw new NotImplementedException(); } } public bool IsSame(object x, object y, EntityMode entityMode) { throw new NotImplementedException(); } public bool IsXMLElement { get { throw new NotImplementedException(); } } public string Name { get { throw new NotImplementedException(); } } public object NullSafeGet(IDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public object NullSafeGet(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public void NullSafeSet(IDbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) { var s = st as SqlCommand; if (s != null) { s.Parameters[index].SqlDbType = SqlDbType.Structured; s.Parameters[index].TypeName = "EmployeeType"; s.Parameters[index].Value = value; } else { var o = st as OracleCommand; o.Parameters[index].OracleDbType = OracleDbType.Array; o.Parameters[index].UdtTypeName = "TESTTYPE"; o.Parameters[index].Value = value; } } public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, ForeignKeyDirection foreignKeyDirection) { throw new NotImplementedException(); } public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) { throw new NotImplementedException(); } public object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public Type ReturnedClass { get { throw new NotImplementedException(); } } public object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public void SetToXMLNode(System.Xml.XmlNode node, object value, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) { throw new NotImplementedException(); } public string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } #endregion #region ICacheAssembler Members public object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public void BeforeAssemble(object cached, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } #endregion #region IType Members public void NullSafeSet(IDbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) { var s = st as SqlCommand; if (s != null) { s.Parameters[index].SqlDbType = SqlDbType.Structured; s.Parameters[index].TypeName = "EmployeeType"; s.Parameters[index].Value = value; } else { var o = st as OracleCommand; o.Parameters[index].OracleDbType = OracleDbType.Array; o.Parameters[index].UdtTypeName = "TESTTYPE"; o.Parameters[index].Value = value; } } #endregion } public static class StructuredExtensions { private static readonly Sql2008Structured structured = new Sql2008Structured(); public static IQuery SetStructured(this IQuery query, string name, DataTable dt) { return query.SetParameter(name, dt, structured); } public static IQuery SetOracleStructured(this IQuery query, string name, Object[] dt) { return query.SetParameter(name, dt, structured); } } } Type defined in Oracle create or replace TYPE employeeType AS OBJECT (employeeId INT, employeeName VARCHAR2 (50)); *************** create or replace TYPE TESTTYPE AS TABLE OF EMPLOYEETYPE; Stored Procedure create or replace PROCEDURE TESTCUSTOMEMPLOYEE (PARAM1 OUT SYS_REFCURSOR,PARAM IN TESTTYPE) IS BEGIN open PARAM1 for SELECT EMP_ID,EMP_NAME,EMP_PASSWORD,TEAM_ASSOCIATED_WITH,IS_CAPTAIN,NO_OF_MOM,BALANCE FROM employee; END; -- 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 |