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: Fabio M. (JIRA) <nh...@gm...> - 2011-05-30 19:31:42
|
[ http://216.121.112.228/browse/NH-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2070. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 Fixed adding "or set cascade.." stuff. The property involved is not available in that context. There are other places where the same exception can show the property involved. > Better error message for "object references an unsaved transient instance" > -------------------------------------------------------------------------- > > Key: NH-2070 > URL: http://216.121.112.228/browse/NH-2070 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Krzysztof Koźmic > Priority: Minor > Fix For: 3.2.0Beta2 > > > In case when Merging object referencing transient instance NHibernate throws error: > "NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: Foo, Entity: Foo" > This is not very helpful in diagnosing the problem as it does not say how the object is referenced. > A more helpful message would be: > "NHibernate.TransientObjectException : Property Bar on object Foo is set to a transient object BarImpl- save the transient BarImpl before flushing (or set cascade action for the property to something that would make it autosave). Type: Foo, Entity: Foo" -- 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:14:36
|
[ http://216.121.112.228/browse/NH-2213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2213. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > CLONE -Wrong parameters order in IQuery with SetParameterList and Filter. SQL Server 2005 > ----------------------------------------------------------------------------------------- > > Key: NH-2213 > URL: http://216.121.112.228/browse/NH-2213 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Stefan Gruendig > Priority: Major > Fix For: 3.2.0Beta2 > > > IQuery query = session.CreateQuery("SELECT e FROM Event e " + > " inner join fetch e.descriptions d " + > " WHERE (e.SendedBy in( :dev)) " + > " AND (e.Date >= :from) " + > " AND (e.Date <= :to)" + > " ORDER BY d.Value"); > List<Device> devices = new List<Device>(); > devices.Add(device); > query.SetParameterList("dev", devices); > query.SetDateTime("from", date); > query.SetDateTime("to", date.AddMonths(1)); > Generated query has wrong parameter order: > select event0_.ID as ID0_0_, descriptio1_.ID as ID2_1_, event0_.IDStrumento as IDStrume2_0_0_, event0_.Data as Data0_0_, descriptio1_.IDEvento as IDEvento2_1_, descriptio1_.Descrizione as Descrizi3_2_1_, descriptio1_.IDLingua as IDLingua2_1_, descriptio1_.IDEvento as IDEvento0__, descriptio1_.ID as ID0__ from tblEventi event0_ inner join tblDescrizioni descriptio1_ on event0_.ID=descriptio1_.IDEvento and @p0 = descriptio1_.IDLingua where > ((event0_.IDStrumento in(@p1))) AND ((event0_.Data>=@p2 )) AND ((event0_.Data<=@p3 )) > order by descriptio1_.Descrizione; > @p0 = 'it', > @p1 = '01/01/2000 0.00.00', <-- WRONG! should be 1 > @p2 = '01/02/2000 0.00.00', > @p3 = '1'<-- WRONG! should be 10 '01/01/2000 0.00.00' > query works if I change the order of SetParameter: > List<Device> devices = new List<Device>(); > devices.Add(device); > query.SetParameterList("dev", devices); > query.SetDateTime("from", date); > query.SetDateTime("to", date.AddMonths(1)); > Generated query has right parameter order: > select event0_.ID as ID0_0_, descriptio1_.ID as ID2_1_, event0_.IDStrumento as IDStrume2_0_0_, event0_.Data as Data0_0_, descriptio1_.IDEvento as IDEvento2_1_, descriptio1_.Descrizione as Descrizi3_2_1_, descriptio1_.IDLingua as IDLingua2_1_, descriptio1_.IDEvento as IDEvento0__, descriptio1_.ID as ID0__ from tblEventi event0_ inner join tblDescrizioni descriptio1_ on event0_.ID=descriptio1_.IDEvento and @p0 = descriptio1_.IDLingua > where ((event0_.Data>=@p1 ))AND((event0_.Data<=@p2 ))AND((event0_.IDStrumento in(@p3))) > order by descriptio1_.Descrizione; > @p0 = 'it', > @p1 = '01/01/2000 0.00.00', > @p2 = '01/02/2000 0.00.00', > @p3 = '2' -- 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:06:42
|
[ http://216.121.112.228/browse/NH-2291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2291. --------------------------- Resolution: Won't Fix Too much time without a test. btw it should be already supported using foreign-key="none" > Support for unenforced foreign keys > ----------------------------------- > > Key: NH-2291 > URL: http://216.121.112.228/browse/NH-2291 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Vlad Golidnichuk > Priority: Major > Attachments: UnenforcedFKs.patch > > > We are using NH to generate database schema for MS SQL Server from a mapping file through Configuration.GenerateSchemaUpdateScript(). The foreign keys that get created as part of this process are enforced (enabled) foreign keys. > It is a requirement for our application to have foreign keys unenforced both for inserts/updates and for replication. The reason for that is, on large databases DRI impairs OLTP performance and concurrency. We have application level mechanisms to ensure data consistency and don't need to rely on DRI. > On the other hand, we would like to have the (unenforced) foreign key constraints in the database for the benefit of report designers and > diagramming tools which use DRI metadata to display table relationships. > NHibernate currently has no support for unenforced foreign key constraints. This cannot be accomplished via a custom dialect or through Auxiliary Database Objects (see http://groups.google.com/group/nhusers/browse_thread/thread/c37b97ff90c9ce94) > We are proposing a patch with (non-breaking) changes to the following core classes in order to enable unenforced foreign keys: > NHibernate.Mapping.Constraint > NHibernate.Mapping.ForeignKey > NHibernate.Dialect.Dialect > NHibernate.Dialect.MsSql2000Dialect > See patch 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: Fabio M. (JIRA) <nh...@gm...> - 2011-05-30 19:02:44
|
[ http://216.121.112.228/browse/NH-2721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21233#action_21233 ] Fabio Maulo commented on NH-2721: --------------------------------- 6.8. Bidirectional Associations Please note that NHibernate does not support bidirectional one-to-many associations with an indexed collection (list, map or array) as the "many" end, you have to use a set or bag mapping. > 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 > -- 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 18:59:42
|
[ http://216.121.112.228/browse/NH-2363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2363. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > Patch for ComponentCollectionCriteriaInfoProvider, fixed persister.ElementType cast in constructor. > --------------------------------------------------------------------------------------------------- > > Key: NH-2363 > URL: http://216.121.112.228/browse/NH-2363 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Denis Bykov > Priority: Minor > Fix For: 3.2.0Beta2 > > Attachments: nh_2.1.2_ComponentCollectionCriteriaInfoProvider.patch > > > It's a patch for ComponentCollectionCriteriaInfoProvider (in NHibernate.Loader.Criteria). > In 2.1.2 there is a cast in constructor of ComponentCollectionCriteriaInfoProvider: > var componentType = (ComponentType)persister.ElementType; > but in some cases type of persister.elementType can be CompositeCustomType, which is not descendant of ComponentType. For example, this situation occurs if we try to fetch items that have collection that meets specific condition, where a single element is of composite type and the former condition requires to test a value of a specific property of the composite type. > Example with some implementation of Linq2Nhibernate: > .Where(some => some.Keywords.Any(keyword => keyword.ID == someKeywordLink.ID)) > So, it's possible to change result type type to IAbstractComponentType from ComponentType. -- 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 18:46:44
|
[ http://216.121.112.228/browse/NH-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2365. --------------------------- Resolution: Obsolete > Minor patch for BinaryLogicOperatorNode (NHibernate.Hql.Ast.ANTLR.Tree) > ------------------------------------------------------------------------ > > Key: NH-2365 > URL: http://216.121.112.228/browse/NH-2365 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Denis Bykov > Priority: Minor > Attachments: nh_2.1.2_BinaryLogicOperatorNode.patch > > > Problem (fixed by this patch) take place when you use in "where" part of your HQL an entity, represented by multicolumn custom/composite user type. Example: "delete from Something entity where entity.Property = :SomePropertyValue", where "entity.Property" is mapped by 2-column composite user type. > Wrong behaviour is provoked by a little error in string splitting in BinaryLogicOperatorNode.ExtractMutationTexts method. It uses StringHelper.Split internally. StringHelper.Split interpret "separators" parameter like char array, therefore it split string that looks like "a, b" with separators=", " into 3 parts: "a", "", "b", and for BinaryLogicOperatorNode.ExtractMutationTexts method this behaviour is incorrect. -- 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 18:24:41
|
[ http://216.121.112.228/browse/NH-2703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2703. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > Using a "with" restriction in outer joins result in wrong SQL > ------------------------------------------------------------- > > Key: NH-2703 > URL: http://216.121.112.228/browse/NH-2703 > Project: NHibernate > Issue Type: Bug > Components: QueryOver > Affects Versions: 3.2.0Beta1 > Reporter: Roy Jacobs > Priority: Major > Fix For: 3.2.0Beta2 > > Attachments: JoinTest.zip, nh2703-fix.patch > > > I have a Parent class that has two types of children: "Child" in a list called "Children" and "Other" in a list called "OtherChildren". > If I do a QueryOver on Parent, and outer join both Child and Other tables then everything works. > If I add a "With" on the "Child" join, linking it to "Other" (e.g. child.MyProp == other.OtherProp) then the SQL that is generated does not work in SQL Server 2008: > SELECT child2_.MyProp as y0_ > FROM Parent this_ > left outer join Child child2_ on this_.Id=child2_.parent_id and ( child2_.MyProp = other1_.OtherProp ) > left outer join Other other1_ on this_.Id=other1_.parent_id > The error message is: > System.Data.SqlClient.SqlException : The multi-part identifier "other1_.OtherProp" could not be bound. > This is because SQL Server expects "other1_" to be joined *BEFORE* "child2_". If I manually change the join order around in the SQL, it works. > Reshuffling the order in which I perform the joins in C# does not help, the emitted SQL is always incorrect. > I have attached a failing test that can be added to NHibernate.Test which demonstrates this problem. -- 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 18:13:47
|
[ http://216.121.112.228/browse/NH-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21232#action_21232 ] Fabio Maulo commented on NH-2656: --------------------------------- If you really want "make NHibernate Linq provider as good as possible" please provide a directly usable test case. http://nhforge.org/blogs/nhibernate/archive/2008/10/04/the-best-way-to-solve-nhibernate-bugs-submit-good-unit-test.aspx > First/FirstOrDefault Doesn't Work > --------------------------------- > > Key: NH-2656 > URL: http://216.121.112.228/browse/NH-2656 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Lee Timmins > > I have the following tests: > [TestMethod] > public void First() { > var result = _session.Query<Post>() > .OrderBy(p => p.Date) > .First(p => p.Comments.Count == 1); > Assert.AreEqual(1, result.PostID); > } > [TestMethod] > public void FirstOrDefault() { > var result = _session.Query<Post>() > .OrderBy(p => p.Date) > .FirstOrDefault(p => p.Comments.Count == 1); > var result2 = _session.Query<Post>() > .OrderBy(p => p.Date) > .FirstOrDefault(p => p.Comments.Count == 10); > Assert.AreEqual(1, result.PostID); > Assert.IsNull(result2); > } > They both worked fine in the old Linq provider (changing Query to Linq) but in version 3.1 it throws the error: > Test method NHibernate3_1.UnitTest.First(OrDefault) threw exception: > System.InvalidOperationException: Sequence contains no elements -- 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 (JIRA) <nh...@gm...> - 2011-05-30 18:11:45
|
[ http://216.121.112.228/browse/NH-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21231#action_21231 ] Andrei commented on NH-2737: ---------------------------- Sorry Fabio, I cloned the request before you reopened the NH-2736. I didn't know that the request can be reopened and that the messages posted on a closed request are taken in consideration. Andrei > CLONE -Inverted parameters in HQL statement using take > ------------------------------------------------------ > > Key: NH-2737 > URL: http://216.121.112.228/browse/NH-2737 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta2 > Reporter: Andrei > Attachments: NH2736.patch > > > Hello, > When I create a HQL query using parameters the parameters are inverted. > Here is an example (I'll attach a test as soon as I have the issue number): > var query = session.CreateQuery("select o.Id, i.Id from SalesOrder o left join o.Items i with i.Quantity = :p0 take :p1"); > query.SetParameter("p0", 1); > query.SetParameter("p1", 2); > var result = query.List(); > Assert.That(result.Count, Is.EqualTo(2)); > The SQL Statement is: > exec sp_executesql N'select TOP (@p0) salesorder0_.Id as col_0_0_, items1_.Id as col_1_0_ from SalesOrder salesorder0_ left outer join Item items1_ on salesorder0_.Id=items1_.SalesOrder and (items1_.Quantity=@p1)',N'@p0 int,@p1 int',@p0=1,@p1=2 > So the query selects the top 1 rows and the quantity column is filtered with 2. > Probably this bug is related with the implementation that allows to specify the take rows using parameters. > Thanks, > Andrei -- 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 17:54:42
|
[ http://216.121.112.228/browse/NH-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2737. --------------------------- Resolution: Duplicate Andrei, please don't CLONE issues if not strictly necessary. This is not a place where when an issue is close for an error the user have to insist opening a clone... in fact the original issue was reopened and fixed. > CLONE -Inverted parameters in HQL statement using take > ------------------------------------------------------ > > Key: NH-2737 > URL: http://216.121.112.228/browse/NH-2737 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta2 > Reporter: Andrei > Attachments: NH2736.patch > > > Hello, > When I create a HQL query using parameters the parameters are inverted. > Here is an example (I'll attach a test as soon as I have the issue number): > var query = session.CreateQuery("select o.Id, i.Id from SalesOrder o left join o.Items i with i.Quantity = :p0 take :p1"); > query.SetParameter("p0", 1); > query.SetParameter("p1", 2); > var result = query.List(); > Assert.That(result.Count, Is.EqualTo(2)); > The SQL Statement is: > exec sp_executesql N'select TOP (@p0) salesorder0_.Id as col_0_0_, items1_.Id as col_1_0_ from SalesOrder salesorder0_ left outer join Item items1_ on salesorder0_.Id=items1_.SalesOrder and (items1_.Quantity=@p1)',N'@p0 int,@p1 int',@p0=1,@p1=2 > So the query selects the top 1 rows and the quantity column is filtered with 2. > Probably this bug is related with the implementation that allows to specify the take rows using parameters. > Thanks, > Andrei -- 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 17:45:42
|
[ http://216.121.112.228/browse/NH-2747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2747. --------------------------- Resolution: Not an Issue Wrong query syntax (even if it may was supported by previous NH versions) select s from Teacher t join t.Students s where t.Name = :teacherName a more clear could be select elements(t.Students) from Teacher t where t.Name = :teacherName > HQL query says collection not mapped in many-to-many relation > ------------------------------------------------------------- > > Key: NH-2747 > URL: http://216.121.112.228/browse/NH-2747 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0, 3.2.0Beta1 > Reporter: Hans Tschan > Priority: Minor > Attachments: NH2747.zip > > > HQL query fails to navigate the associated collection. I have a Student <> Teacher many-to-many relationship and when I ask "select Student from Teacher t, t.Students where t.Name = :teacherName". This kind of query worked in NHibernate 2.0.1 GA. > I tried it with NHibernate 3.1 an 3.2Beta1, which both gave the errror t.Students not mapped. > NHibernate.Hql.Ast.ANTLR.QuerySyntaxException was unhandled > Message=t.Students is not mapped [select Student from Teacher t, t.Students where t.Name = :teacherName] > Source=NHibernate > QueryString=select Student from Teacher t, t.Students where t.Name = :teacherName > StackTrace: > at NHibernate.Hql.Ast.ANTLR.SessionFactoryHelperExtensions.RequireClassPersister(String name) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\SessionFactoryHelperExtensions.cs:line 230 > at NHibernate.Hql.Ast.ANTLR.Tree.FromElementFactory.AddFromElement() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Tree\FromElementFactory.cs:line 82 > at NHibernate.Hql.Ast.ANTLR.Tree.FromClause.AddFromElement(String path, IASTNode alias) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Tree\FromClause.cs:line 166 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.CreateFromElement(String path, IASTNode pathNode, IASTNode alias, IASTNode propertyFetch) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\HqlSqlWalker.cs:line 715 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromElement() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlSqlWalker.cs:line 3894 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromElementList() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlSqlWalker.cs:line 3707 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromClause() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlSqlWalker.cs:line 3624 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.unionedQuery() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlSqlWalker.cs:line 1658 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.query() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlSqlWalker.cs:line 1514 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.selectStatement() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlSqlWalker.cs:line 540 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.statement() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlSqlWalker.cs:line 439 > at NHibernate.Hql.Ast.ANTLR.HqlSqlTranslator.Translate() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\QueryTranslatorImpl.cs:line 590 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Analyze(String collectionRole) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\QueryTranslatorImpl.cs:line 449 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.DoCompile(IDictionary`2 replacements, Boolean shallow, String collectionRole) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\QueryTranslatorImpl.cs:line 401 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Compile(IDictionary`2 replacements, Boolean shallow) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\QueryTranslatorImpl.cs:line 71 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs:line 43 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryString, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs:line 21 > at NHibernate.Engine.Query.HQLStringQueryPlan.CreateTranslators(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Engine\Query\HQLStringQueryPlan.cs:line 24 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Engine\Query\HQLStringQueryPlan.cs:line 16 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Engine\Query\HQLStringQueryPlan.cs:line 10 > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Engine\Query\QueryPlanCache.cs:line 61 > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query, Boolean shallow) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\AbstractSessionImpl.cs:line 304 > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(String queryString) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\AbstractSessionImpl.cs:line 283 > at NHibernate.Test.NHSpecificTest.NHBugHqlManyToMany.SampleTest.ShouldBeAbleToGetFromTeacherToStudents() in C:\Temp\NHibernate\NHBugHqlManyToMany\NHibernate.Test\NHSpecificTest\NHBugHqlManyToMany\SampleTest.cs:line 74 > at ConsoleApplication2.Program.Main(String[] args) in C:\Temp\NHibernate\NHBugHqlManyToMany\ConsoleApplication2\Program.cs:line 14 > at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) > at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) > at System.Threading.ThreadHelper.ThreadStart() > InnerException: -- 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 17:29:41
|
[ http://216.121.112.228/browse/NH-2700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reopened NH-2700: ----------------------------- Ups!!! Sorry, it is not fixed for Criteria > 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 > Fix For: 3.2.0Beta2 > > 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-30 17:27:41
|
[ http://216.121.112.228/browse/NH-2700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2700. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 Just be sure that you are not transformig a SqlString or a Parameter to a string. > 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 > Fix For: 3.2.0Beta2 > > 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-30 17:25:45
|
[ http://216.121.112.228/browse/NH-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21226#action_21226 ] Fabio Maulo commented on NH-2318: --------------------------------- Fixed for HQL and LINQ in NH3.2.0Beta2 > Template functions fail with certain combinations of arguments. > --------------------------------------------------------------- > > Key: NH-2318 > URL: http://216.121.112.228/browse/NH-2318 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.Alpha2 > Reporter: Patrick Earl > Assignee: Patrick Earl > Attachments: HqlParameterReordering.patch, ISqlFunctionParameterReordering.patch, SqlFunctionProjectionFix.patch, TrimFunctionsTest.patch, TrimFunctionsTest2.patch > > > Some template functions such as TRIM() fail since they use repeated arguments in the template. Additionally, the LEADING and TRAILING trim emulation functions have their ltrim and rtrim reversed. Included is a unit test that demonstrates that failure. -- 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 16:52:41
|
[ http://216.121.112.228/browse/NH-2328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2328. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > Linq query on <Any/> fails > -------------------------- > > Key: NH-2328 > URL: http://216.121.112.228/browse/NH-2328 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.Alpha2 > Reporter: Michael Kobaly > Priority: Major > Fix For: 3.2.0Beta2 > > Attachments: NHibernate.Test.zip > > > Please read NHUsers group posting here for description of problem. > http://groups.google.com/group/nhusers/browse_thread/thread/fa831bd703842e1e > I excluded the lib folder from the zip file since upload says not to include dlls. I am using NH 3 Alpha 2 with all supporting dlls. First time posting bug..sorry in advance if I am doing it wrong. -- 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 16:50:41
|
[ http://216.121.112.228/browse/NH-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2741. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > CLONE -HQL .class query on <any> mapping does not work > ------------------------------------------------------ > > Key: NH-2741 > URL: http://216.121.112.228/browse/NH-2741 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta1 > Reporter: Andrei Alecu > Priority: Major > Fix For: 3.2.0Beta2 > > Attachments: nh2724 and nh2328.patch > > > Consider the test in trunk for NH-2328. > Modifying it to do this does not work: > var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = Square") > .List<ToyBox>(); > The error is: > System.NullReferenceException : Object reference not set to an instance of an object. > at NHibernate.Hql.Ast.ANTLR.SessionFactoryHelperExtensions.FindSQLFunction(String functionName) in SessionFactoryHelperExtensions.cs: line 45 > at NHibernate.Hql.Ast.ANTLR.Tree.IdentNode.get_DataType() in IdentNode.cs: line 41 > at NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode.ExtractDataType(IASTNode operand) in BinaryLogicOperatorNode.cs: line 244 > at NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode.Initialize() in BinaryLogicOperatorNode.cs: line 50 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.PrepareLogicOperator(IASTNode operatorNode) in HqlSqlWalker.cs: line 786 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.comparisonExpr() in HqlSqlWalker.cs: line 6239 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.logicalExpr() in HqlSqlWalker.cs: line 5228 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.whereClause() in HqlSqlWalker.cs: line 4952 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.unionedQuery() in HqlSqlWalker.cs: line 1706 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.query() in HqlSqlWalker.cs: line 1514 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.selectStatement() in HqlSqlWalker.cs: line 540 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.statement() in HqlSqlWalker.cs: line 439 > at NHibernate.Hql.Ast.ANTLR.HqlSqlTranslator.Translate() in QueryTranslatorImpl.cs: line 590 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Analyze(String collectionRole) in QueryTranslatorImpl.cs: line 449 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.DoCompile(IDictionary`2 replacements, Boolean shallow, String collectionRole) in QueryTranslatorImpl.cs: line 354 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Compile(IDictionary`2 replacements, Boolean shallow) in QueryTranslatorImpl.cs: line 71 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in ASTQueryTranslatorFactory.cs: line 43 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryString, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in ASTQueryTranslatorFactory.cs: line 21 > at NHibernate.Engine.Query.HQLStringQueryPlan.CreateTranslators(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 24 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 16 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 10 > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters) in QueryPlanCache.cs: line 61 > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query, Boolean shallow) in AbstractSessionImpl.cs: line 304 > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(String queryString) in AbstractSessionImpl.cs: line 283 > at NHibernate.Test.NHSpecificTest.NH2328.Fixture.AnyIs_HqlRequiresNumberIn() in Fixture.cs: line 80 > However, explicitly using a parameter works properly: > var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = :clazz") > .SetParameter("clazz", typeof(Square).FullName).List<ToyBox>(); > Upon further inspection, it works because the implementation calls NullSafeSet() on MetaType while setting the parameter. If the type is specified inline, NullSafeSet isn't called. > I believe the proper fix here would be for the query parser to extract what's after = here and pass it in as a parameter, if possible, so that NullSafeSet() is called. It might involve changes to the grammar files, I'm not sure. > Fixing this bug in the HQL parser should also fix NH-2328. -- 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 16:13:41
|
[ http://216.121.112.228/browse/NH-2738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2738. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > Exception thrown when mapping contains empty enum > ------------------------------------------------- > > Key: NH-2738 > URL: http://216.121.112.228/browse/NH-2738 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.2.0Beta1 > Reporter: Michael Teper > Priority: Minor > Fix For: 3.2.0Beta2 > > > I was playing around with new mapping by code and ConventionModelMapper and ran into an "Array ouf bounds exception". Turned out that one of my entities had an enum property and the enum was empty (I haven't yet added any values). As this was a pretty trivial project, the issue was easy to track down but it would be great if this was handled better by NH. Either this should be ignored (what's the harm?) or the error message should point out the empty enum and the class that was referencing it. > Thank you! -- 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-30 16:11:46
|
[ http://216.121.112.228/browse/NH-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21225#action_21225 ] Andrei Alecu commented on NH-2741: ---------------------------------- The patch fixes NH-2328 and this current issue (NH-2741 , and also the one you closed at NH-2734, which made me make this clone :)). There are some tests attached in the patch file, I mainly removed [Ignore] from those failing tests (since they now pass). To reiterate, it allows .class = ClassName on <any/> mappings, instead of needing to use the underlaying meta-value, so that this works: var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = Square") // without the patch, this would throw an exception .List<ToyBox>(); And since this works, it also fixes NH-2328 by default. The tests are in the .patch file and they're under the NH2328 folder in NHSpecificTests. > CLONE -HQL .class query on <any> mapping does not work > ------------------------------------------------------ > > Key: NH-2741 > URL: http://216.121.112.228/browse/NH-2741 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta1 > Reporter: Andrei Alecu > Priority: Major > Attachments: nh2724 and nh2328.patch > > > Consider the test in trunk for NH-2328. > Modifying it to do this does not work: > var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = Square") > .List<ToyBox>(); > The error is: > System.NullReferenceException : Object reference not set to an instance of an object. > at NHibernate.Hql.Ast.ANTLR.SessionFactoryHelperExtensions.FindSQLFunction(String functionName) in SessionFactoryHelperExtensions.cs: line 45 > at NHibernate.Hql.Ast.ANTLR.Tree.IdentNode.get_DataType() in IdentNode.cs: line 41 > at NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode.ExtractDataType(IASTNode operand) in BinaryLogicOperatorNode.cs: line 244 > at NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode.Initialize() in BinaryLogicOperatorNode.cs: line 50 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.PrepareLogicOperator(IASTNode operatorNode) in HqlSqlWalker.cs: line 786 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.comparisonExpr() in HqlSqlWalker.cs: line 6239 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.logicalExpr() in HqlSqlWalker.cs: line 5228 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.whereClause() in HqlSqlWalker.cs: line 4952 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.unionedQuery() in HqlSqlWalker.cs: line 1706 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.query() in HqlSqlWalker.cs: line 1514 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.selectStatement() in HqlSqlWalker.cs: line 540 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.statement() in HqlSqlWalker.cs: line 439 > at NHibernate.Hql.Ast.ANTLR.HqlSqlTranslator.Translate() in QueryTranslatorImpl.cs: line 590 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Analyze(String collectionRole) in QueryTranslatorImpl.cs: line 449 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.DoCompile(IDictionary`2 replacements, Boolean shallow, String collectionRole) in QueryTranslatorImpl.cs: line 354 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Compile(IDictionary`2 replacements, Boolean shallow) in QueryTranslatorImpl.cs: line 71 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in ASTQueryTranslatorFactory.cs: line 43 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryString, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in ASTQueryTranslatorFactory.cs: line 21 > at NHibernate.Engine.Query.HQLStringQueryPlan.CreateTranslators(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 24 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 16 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 10 > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters) in QueryPlanCache.cs: line 61 > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query, Boolean shallow) in AbstractSessionImpl.cs: line 304 > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(String queryString) in AbstractSessionImpl.cs: line 283 > at NHibernate.Test.NHSpecificTest.NH2328.Fixture.AnyIs_HqlRequiresNumberIn() in Fixture.cs: line 80 > However, explicitly using a parameter works properly: > var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = :clazz") > .SetParameter("clazz", typeof(Square).FullName).List<ToyBox>(); > Upon further inspection, it works because the implementation calls NullSafeSet() on MetaType while setting the parameter. If the type is specified inline, NullSafeSet isn't called. > I believe the proper fix here would be for the query parser to extract what's after = here and pass it in as a parameter, if possible, so that NullSafeSet() is called. It might involve changes to the grammar files, I'm not sure. > Fixing this bug in the HQL parser should also fix NH-2328. -- 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 16:03:41
|
[ http://216.121.112.228/browse/NH-2738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2738: ---------------------------- Component/s: (was: Mapping by-code) Core > Exception thrown when mapping contains empty enum > ------------------------------------------------- > > Key: NH-2738 > URL: http://216.121.112.228/browse/NH-2738 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.2.0Beta1 > Reporter: Michael Teper > Priority: Minor > > I was playing around with new mapping by code and ConventionModelMapper and ran into an "Array ouf bounds exception". Turned out that one of my entities had an enum property and the enum was empty (I haven't yet added any values). As this was a pretty trivial project, the issue was easy to track down but it would be great if this was handled better by NH. Either this should be ignored (what's the harm?) or the error message should point out the empty enum and the class that was referencing it. > Thank you! -- 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 15:31:41
|
[ http://216.121.112.228/browse/NH-2739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2739. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta2 > Can't get ByCode mapping to produce not nullable varbinary(max) > --------------------------------------------------------------- > > Key: NH-2739 > URL: http://216.121.112.228/browse/NH-2739 > Project: NHibernate > Issue Type: Bug > Components: Mapping by-code > Affects Versions: 3.2.0Beta1 > Reporter: Michael Teper > Priority: Major > Fix For: 3.2.0Beta2 > > > Trying to map the following class: > public class MyData > { > public byte[] Data { get; set; } > } > to 'varbinary(max) (not null)' field in SQL Server 2008. > mapper.Class<MyData>(map => > { > map.Property(x => x.Data, m => m.Length(int.MaxValue)); > map.Property(x => x.Data, m => m.NotNullable(true)); > }); > produces 'image(null)' -- 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 15:28:42
|
[ http://216.121.112.228/browse/NH-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2725. --------------------------- Resolution: Duplicate How much times you think you can continue duplicating your issues ? The NH-2713 will be checked in some moment that is all. Your anxiety will not change the passing of events. > CLONE -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-2725 > URL: http://216.121.112.228/browse/NH-2725 > Project: NHibernate > Issue Type: Bug > Components: Core, Mapping by-code > Affects Versions: 3.0.0.GA > Reporter: Anupam Mishra > Priority: Major > > 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-30 15:22:44
|
[ http://216.121.112.228/browse/NH-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2751. --------------------------- Resolution: Not an Issue For questions please use the nhusers group providing the exception and the inner exception message. Your mapping does not satisfies the schema (xsd) or you have another problem not related to NH code. > CLONE -Nhibernate 3.0 Upgrade Mapping Issue > ------------------------------------------- > > Key: NH-2751 > URL: http://216.121.112.228/browse/NH-2751 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: parag vyas > Priority: Critical > Attachments: ServerConfiguration.png > > > Hello > This is my server configuration -- > Find attached Document > This exception I get when I upgrade to NHibernate3 and host my code on my server. > Exception information: Exception type: MappingException Exception message: Could not compile the mapping document: (unknown) > Stack trace: at NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) > at NHibernate.Cfg.Configuration.LoadMappingDocument(XmlReader hbmReader, String name) > at NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader, String name) > at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name) > at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) > Please reply if you have any idea............... > Thanks > Parag Vyas -- 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 15:16:45
|
[ http://216.121.112.228/browse/NH-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21222#action_21222 ] Fabio Maulo commented on NH-2741: --------------------------------- Andrei, can you resume which are the issues solved by your patch ? > CLONE -HQL .class query on <any> mapping does not work > ------------------------------------------------------ > > Key: NH-2741 > URL: http://216.121.112.228/browse/NH-2741 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Beta1 > Reporter: Andrei Alecu > Priority: Major > Attachments: nh2724 and nh2328.patch > > > Consider the test in trunk for NH-2328. > Modifying it to do this does not work: > var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = Square") > .List<ToyBox>(); > The error is: > System.NullReferenceException : Object reference not set to an instance of an object. > at NHibernate.Hql.Ast.ANTLR.SessionFactoryHelperExtensions.FindSQLFunction(String functionName) in SessionFactoryHelperExtensions.cs: line 45 > at NHibernate.Hql.Ast.ANTLR.Tree.IdentNode.get_DataType() in IdentNode.cs: line 41 > at NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode.ExtractDataType(IASTNode operand) in BinaryLogicOperatorNode.cs: line 244 > at NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode.Initialize() in BinaryLogicOperatorNode.cs: line 50 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.PrepareLogicOperator(IASTNode operatorNode) in HqlSqlWalker.cs: line 786 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.comparisonExpr() in HqlSqlWalker.cs: line 6239 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.logicalExpr() in HqlSqlWalker.cs: line 5228 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.whereClause() in HqlSqlWalker.cs: line 4952 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.unionedQuery() in HqlSqlWalker.cs: line 1706 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.query() in HqlSqlWalker.cs: line 1514 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.selectStatement() in HqlSqlWalker.cs: line 540 > at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.statement() in HqlSqlWalker.cs: line 439 > at NHibernate.Hql.Ast.ANTLR.HqlSqlTranslator.Translate() in QueryTranslatorImpl.cs: line 590 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Analyze(String collectionRole) in QueryTranslatorImpl.cs: line 449 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.DoCompile(IDictionary`2 replacements, Boolean shallow, String collectionRole) in QueryTranslatorImpl.cs: line 354 > at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Compile(IDictionary`2 replacements, Boolean shallow) in QueryTranslatorImpl.cs: line 71 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in ASTQueryTranslatorFactory.cs: line 43 > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryString, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in ASTQueryTranslatorFactory.cs: line 21 > at NHibernate.Engine.Query.HQLStringQueryPlan.CreateTranslators(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 24 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 16 > at NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) in HQLStringQueryPlan.cs: line 10 > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters) in QueryPlanCache.cs: line 61 > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query, Boolean shallow) in AbstractSessionImpl.cs: line 304 > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(String queryString) in AbstractSessionImpl.cs: line 283 > at NHibernate.Test.NHSpecificTest.NH2328.Fixture.AnyIs_HqlRequiresNumberIn() in Fixture.cs: line 80 > However, explicitly using a parameter works properly: > var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = :clazz") > .SetParameter("clazz", typeof(Square).FullName).List<ToyBox>(); > Upon further inspection, it works because the implementation calls NullSafeSet() on MetaType while setting the parameter. If the type is specified inline, NullSafeSet isn't called. > I believe the proper fix here would be for the query parser to extract what's after = here and pass it in as a parameter, if possible, so that NullSafeSet() is called. It might involve changes to the grammar files, I'm not sure. > Fixing this bug in the HQL parser should also fix NH-2328. -- 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: parag v. (JIRA) <nh...@gm...> - 2011-05-30 15:01:49
|
[ http://216.121.112.228/browse/NH-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21221#action_21221 ] parag vyas commented on NH-2751: -------------------------------- But I have the same site of N-Hibernate1 which is hosted on same server and it is working fine So Can you tell me is any thing related to XML Serialize change with the version of N-Hibernate? This is the configuration which i use ------------------------------------- System.IO.MemoryStream stream = new System.IO.MemoryStream(); NHibernate.Mapping.Attributes.HbmSerializer.Default.Validate = true; NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration(); cfg.SetProperty("connection.connection_string", DomainUtility.GetConnectionString()); cfg.SetProperty("connection.provider", "NHibernate.Connection.DriverConnectionProvider"); cfg.SetProperty("connection.driver_class", "NHibernate.Driver.SqlClientDriver"); cfg.SetProperty("dialect", "NHibernate.Dialect.MsSql2005Dialect"); cfg.SetProperty("connection.isolation", "ReadCommitted"); cfg.SetProperty("command_timeout", "60000"); cfg.SetProperty("adonet.batch_size", "500"); cfg.SetProperty("proxyfactory.factory_class", "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle"); cfg.SetProperty("use_proxy_validator", "false"); NHibernate.Mapping.Attributes.HbmSerializer.Default.Serialize( stream, Assembly.GetExecutingAssembly()); stream.Position = 0; cfg.AddInputStream(stream); > CLONE -Nhibernate 3.0 Upgrade Mapping Issue > ------------------------------------------- > > Key: NH-2751 > URL: http://216.121.112.228/browse/NH-2751 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: parag vyas > Priority: Critical > Attachments: ServerConfiguration.png > > > Hello > This is my server configuration -- > Find attached Document > This exception I get when I upgrade to NHibernate3 and host my code on my server. > Exception information: Exception type: MappingException Exception message: Could not compile the mapping document: (unknown) > Stack trace: at NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) > at NHibernate.Cfg.Configuration.LoadMappingDocument(XmlReader hbmReader, String name) > at NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader, String name) > at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name) > at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) > Please reply if you have any idea............... > Thanks > Parag Vyas -- 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: parag v. (JIRA) <nh...@gm...> - 2011-05-30 15:01:41
|
CLONE -Nhibernate 3.0 Upgrade Mapping Issue ------------------------------------------- Key: NH-2751 URL: http://216.121.112.228/browse/NH-2751 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.0.0.GA Reporter: parag vyas Priority: Critical Attachments: ServerConfiguration.png Hello This is my server configuration -- > Find attached Document This exception I get when I upgrade to NHibernate3 and host my code on my server. Exception information: Exception type: MappingException Exception message: Could not compile the mapping document: (unknown) Stack trace: at NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) at NHibernate.Cfg.Configuration.LoadMappingDocument(XmlReader hbmReader, String name) at NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader, String name) at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name) at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) Please reply if you have any idea............... Thanks Parag Vyas -- 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 |