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: Andrei A. (JIRA) <nh...@gm...> - 2011-05-24 11:01:44
|
Allow query on .id special accessor on <any> mappings via Linq
--------------------------------------------------------------
Key: NH-2735
URL: http://216.121.112.228/browse/NH-2735
Project: NHibernate
Issue Type: Improvement
Components: Core
Affects Versions: 3.2.0Beta1
Reporter: Andrei Alecu
Querying a property defined with an <any> mapping by its id needs to use the special .class and .id properties defined by HQL.
Not having a way to access .id makes it impossible to translate queries such as the following to Linq:
from ToyBox t where t.Shape.class = Square and t.Shape.id = 1 (note that there's currently a bug with .class at NH-2734)
Note that accessing the identifier property mapped as .Id (non lowercase) does not work, the HQL query parser complains that there's an access to an unmapped property .Id.
My current workaround is to define this extension method as a custom linq generator:
public class ImplicitIdGenerator : BaseHqlGeneratorForMethod
{
public ImplicitIdGenerator()
{
this.SupportedMethods = new[] { ReflectionHelper.GetMethodDefinition<object>(x => x.ImplicitId()) };
}
public override HqlTreeNode BuildHql(
MethodInfo method,
Expression targetObject,
ReadOnlyCollection<Expression> arguments,
HqlTreeBuilder treeBuilder,
IHqlExpressionVisitor visitor)
{
return treeBuilder.Dot(visitor.Visit(arguments[0]).AsExpression(), treeBuilder.Ident("id"));
}
}
public static class NhibernateLinqExtensions
{
public static object ImplicitId(this object what)
{
throw new NotImplementedException("Used by NHibernate linq with <any> mappings.");
}
}
I believe the special .id property may also be used in other circumstances when the name of the property used for the identifier is not known.
I'm not sure if this is the most elegant implementation, but this code lets you do this:
var results = session.Query<ToyBox>().Where(x=> /* class constraint, see NH-2328 */ && x.Shape.ImplicitId() == 1);
--
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: Richard B. (JIRA) <nh...@gm...> - 2011-05-24 10:57:44
|
[ http://216.121.112.228/browse/NH-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Brown reassigned NH-2733:
---------------------------------
Assignee: Richard Brown
> Using an expression in QueryOver gives: Lambda Parameter not in scope
> ---------------------------------------------------------------------
>
> Key: NH-2733
> URL: http://216.121.112.228/browse/NH-2733
> Project: NHibernate
> Issue Type: Bug
> Components: QueryOver
> Affects Versions: 3.2.0CR1
> Reporter: Roy Jacobs
> Assignee: Richard Brown
> Priority: Major
> Attachments: NH2733.zip
>
>
> Among other things we occasionally use an IExpression in a QueryOver 'where', like so:
> query.Where(expression);
> This used to work quite well in the SVN trunk version of last week, but since then this starts breaking with an ArgumentException saying "Lambda Parameter not in scope".
> Now, I've seen that QueryOver got a bit of work done to support things like YearPart etc., so I'm assuming these changes are related.
> The expression is constructed like this:
> public Expression<Func<Item, bool>> GetExpression(DateTime? myStartDate, DateTime? myStopDate)
> {
> return item => item.StartDateTime < myStopDate.Value && item.StartDateTime >= myStartDate.Value;
> }
> The call-stack (copy/pasted from R# test runner) looks like this:
> --InvalidOperationException
> at System.Linq.Expressions.ExpressionCompiler.GenerateParameterAccess(ILGenerator gen, ParameterExpression p, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.GenerateMemberAccess(ILGenerator gen, Expression expression, MemberInfo member, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.GenerateLambda(LambdaExpression lambda)
> at System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda(LambdaExpression lambda)
> at System.Linq.Expressions.LambdaExpression.Compile()
> at NHibernate.Impl.ExpressionProcessor.EvaluatesToNull(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 280
> at NHibernate.Impl.ExpressionProcessor.IsMemberExpression(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 335
> at NHibernate.Impl.ExpressionProcessor.FindMemberProjection(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 166
> at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(Expression left, Expression right, ExpressionType nodeType) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 411
> at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 503
> at NHibernate.Impl.ExpressionProcessor.ProcessAndExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 470
> at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 506
> at NHibernate.Impl.ExpressionProcessor.ProcessExpression(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 595
> at NHibernate.Criterion.QueryOver`2.Add(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 749
> at NHibernate.Criterion.QueryOver`2.Where(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 357
> at NHibernate.Criterion.QueryOver`2.NHibernate.IQueryOver<TRoot,TSubType>.Where(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 800
--
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: Roy J. (JIRA) <nh...@gm...> - 2011-05-24 10:51:47
|
[ http://216.121.112.228/browse/NH-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roy Jacobs updated NH-2733:
---------------------------
Attachment: NH2733.zip
Added a failing unit test.
The problem is related to having a component inside of a mapping, the problem did not manifest itself when I didn't have the component.
> Using an expression in QueryOver gives: Lambda Parameter not in scope
> ---------------------------------------------------------------------
>
> Key: NH-2733
> URL: http://216.121.112.228/browse/NH-2733
> Project: NHibernate
> Issue Type: Bug
> Components: QueryOver
> Affects Versions: 3.2.0CR1
> Reporter: Roy Jacobs
> Priority: Major
> Attachments: NH2733.zip
>
>
> Among other things we occasionally use an IExpression in a QueryOver 'where', like so:
> query.Where(expression);
> This used to work quite well in the SVN trunk version of last week, but since then this starts breaking with an ArgumentException saying "Lambda Parameter not in scope".
> Now, I've seen that QueryOver got a bit of work done to support things like YearPart etc., so I'm assuming these changes are related.
> The expression is constructed like this:
> public Expression<Func<Item, bool>> GetExpression(DateTime? myStartDate, DateTime? myStopDate)
> {
> return item => item.StartDateTime < myStopDate.Value && item.StartDateTime >= myStartDate.Value;
> }
> The call-stack (copy/pasted from R# test runner) looks like this:
> --InvalidOperationException
> at System.Linq.Expressions.ExpressionCompiler.GenerateParameterAccess(ILGenerator gen, ParameterExpression p, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.GenerateMemberAccess(ILGenerator gen, Expression expression, MemberInfo member, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
> at System.Linq.Expressions.ExpressionCompiler.GenerateLambda(LambdaExpression lambda)
> at System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda(LambdaExpression lambda)
> at System.Linq.Expressions.LambdaExpression.Compile()
> at NHibernate.Impl.ExpressionProcessor.EvaluatesToNull(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 280
> at NHibernate.Impl.ExpressionProcessor.IsMemberExpression(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 335
> at NHibernate.Impl.ExpressionProcessor.FindMemberProjection(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 166
> at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(Expression left, Expression right, ExpressionType nodeType) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 411
> at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 503
> at NHibernate.Impl.ExpressionProcessor.ProcessAndExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 470
> at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 506
> at NHibernate.Impl.ExpressionProcessor.ProcessExpression(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 595
> at NHibernate.Criterion.QueryOver`2.Add(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 749
> at NHibernate.Criterion.QueryOver`2.Where(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 357
> at NHibernate.Criterion.QueryOver`2.NHibernate.IQueryOver<TRoot,TSubType>.Where(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 800
--
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-24 10:47:54
|
[ http://216.121.112.228/browse/NH-2328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21170#action_21170 ]
Andrei Alecu commented on NH-2328:
----------------------------------
Opened separate issue at NH-2734 for the HQL side of this bug. Fixing HQL should fix Linq by default.
> 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
> 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: Andrei A. (JIRA) <nh...@gm...> - 2011-05-24 10:43:45
|
HQL .class query on <any> mapping does not work
-----------------------------------------------
Key: NH-2734
URL: http://216.121.112.228/browse/NH-2734
Project: NHibernate
Issue Type: Bug
Components: Core
Affects Versions: 3.2.0Beta1
Reporter: Andrei Alecu
Priority: Major
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: Roy J. (JIRA) <nh...@gm...> - 2011-05-24 09:54:45
|
Using an expression in QueryOver gives: Lambda Parameter not in scope
---------------------------------------------------------------------
Key: NH-2733
URL: http://216.121.112.228/browse/NH-2733
Project: NHibernate
Issue Type: Bug
Components: QueryOver
Affects Versions: 3.2.0CR1
Reporter: Roy Jacobs
Priority: Major
Among other things we occasionally use an IExpression in a QueryOver 'where', like so:
query.Where(expression);
This used to work quite well in the SVN trunk version of last week, but since then this starts breaking with an ArgumentException saying "Lambda Parameter not in scope".
Now, I've seen that QueryOver got a bit of work done to support things like YearPart etc., so I'm assuming these changes are related.
The expression is constructed like this:
public Expression<Func<Item, bool>> GetExpression(DateTime? myStartDate, DateTime? myStopDate)
{
return item => item.StartDateTime < myStopDate.Value && item.StartDateTime >= myStartDate.Value;
}
The call-stack (copy/pasted from R# test runner) looks like this:
--InvalidOperationException
at System.Linq.Expressions.ExpressionCompiler.GenerateParameterAccess(ILGenerator gen, ParameterExpression p, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateMemberAccess(ILGenerator gen, Expression expression, MemberInfo member, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask)
at System.Linq.Expressions.ExpressionCompiler.GenerateLambda(LambdaExpression lambda)
at System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda(LambdaExpression lambda)
at System.Linq.Expressions.LambdaExpression.Compile()
at NHibernate.Impl.ExpressionProcessor.EvaluatesToNull(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 280
at NHibernate.Impl.ExpressionProcessor.IsMemberExpression(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 335
at NHibernate.Impl.ExpressionProcessor.FindMemberProjection(Expression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 166
at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(Expression left, Expression right, ExpressionType nodeType) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 411
at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 503
at NHibernate.Impl.ExpressionProcessor.ProcessAndExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 470
at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 506
at NHibernate.Impl.ExpressionProcessor.ProcessExpression(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs: line 595
at NHibernate.Criterion.QueryOver`2.Add(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 749
at NHibernate.Criterion.QueryOver`2.Where(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 357
at NHibernate.Criterion.QueryOver`2.NHibernate.IQueryOver<TRoot,TSubType>.Where(Expression`1 expression) in c:\sandbox\nhibernate\src\NHibernate\Criterion\QueryOver.cs: line 800
--
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-24 09:23:52
|
[ http://216.121.112.228/browse/NH-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21169#action_21169 ]
Ricardo Peres commented on NH-2727:
-----------------------------------
The scenario is this:
#1: OK
using (ISession session = sessionFactory.OpenSession())
{
UserGroup ug = session.Query<UserGroup>().FirstOrDefault();
User u = ug.User;
Debug.Assert(session.IsChanged(ug) == false);
Debug.Assert(session.IsChanged(u) == false);
Debug.Assert(ug.User == u);
Debug.Assert(session.IsDirty() == false);
}
#2: Problem
using (ISession session = sessionFactory.OpenSession())
{
User u = session.Query<User>().FirstOrDefault();
UserGroup ug = u.UserGroup.First();
Debug.Assert(session.IsChanged(ug) == false);
Debug.Assert(session.IsChanged(u) == false);
Debug.Assert(ug.User == u);
Debug.Assert(session.IsDirty() == false); //SaveOrUpdate event is raised, which, in my case, triggers a change in an entity, causing the session to be dirty
}
#3: Problem
using (ISession session = sessionFactory.OpenSession())
{
session.Query<UserGroup>().ToList(); //even if I preload all UserGroups, the event is still raised
User u = session.Query<User>().FirstOrDefault();
UserGroup ug = u.UserGroup.First();
Debug.Assert(session.IsChanged(ug) == false);
Debug.Assert(session.IsChanged(u) == false);
Debug.Assert(ug.User == u);
Debug.Assert(session.IsDirty() == false); //SaveOrUpdate event is raised, which, in my case, triggers a change in an entity, causing the session to be dirty
}
> Calling ISession.IsDirty Raises SaveOrUpdate Event
> --------------------------------------------------
>
> Key: NH-2727
> URL: http://216.121.112.228/browse/NH-2727
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.1.0, 3.2.0Beta1
> Reporter: Ricardo Peres
> Attachments: FlushTest.zip
>
>
> When calling ISession.IsDirty() after loading an entity which lazy loads another one and doing nothing to them, the SaveOrUpdate event is raised on the lazy loaded entity.
> This doesn't happen all the time, only if the lazy loaded entity is not specifically loaded beforehand.
> The included test creates the DB and populates it with test records. The HIBERNATE_UNIQUE_KEY table must be created first, since SchemaUpdate does not create it.
--
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-24 06:18:43
|
[ http://216.121.112.228/browse/NH-2723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vahid Nasiri updated NH-2723:
-----------------------------
Attachment: sql_ce4_dialect.zip
In SQL CE: TOP and OFFSET clause cannot be used together in the same query, so another patch has been attached.
> Enhanced SQL CE 4.0 dialect
> ---------------------------
>
> Key: NH-2723
> URL: http://216.121.112.228/browse/NH-2723
> Project: NHibernate
> Issue Type: Improvement
> Components: DataProviders / Dialects
> Affects Versions: 3.2.0Beta1
> Reporter: Vahid Nasiri
> Priority: Minor
> Attachments: sql_ce4_dialect.zip, sqlce4_dialect.zip
>
>
> Hello,
> I've attached an enhanced SQL CE 4.0 dialect file/patch which supports select top(n) statements (ported from sql server dialects), adds lots of missing native SQL functions and keywords.
--
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-24 05:33:46
|
[ http://216.121.112.228/browse/NH-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Earl resolved NH-2732.
------------------------------
Resolution: Fixed
Various limit-related bugs and missing features were dealt with in this commit as well.
> Dialect.GetLimitString simplifications and improvements
> -------------------------------------------------------
>
> Key: NH-2732
> URL: http://216.121.112.228/browse/NH-2732
> Project: NHibernate
> Issue Type: Improvement
> Components: DataProviders / Dialects
> Affects Versions: 3.2.0Beta1
> Reporter: Patrick Earl
> Assignee: Patrick Earl
> Fix For: 3.2.0CR1
>
>
> There are too many GetLimitString overrides that do basically the same thing. Eliminate all but one unified method.
--
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-24 05:31:45
|
Dialect.GetLimitString simplifications and improvements
-------------------------------------------------------
Key: NH-2732
URL: http://216.121.112.228/browse/NH-2732
Project: NHibernate
Issue Type: Improvement
Components: DataProviders / Dialects
Affects Versions: 3.2.0Beta1
Reporter: Patrick Earl
Assignee: Patrick Earl
Fix For: 3.2.0CR1
There are too many GetLimitString overrides that do basically the same thing. Eliminate all but one unified method.
--
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-24 05:28:44
|
Limit parameters should be updated on each query execution
----------------------------------------------------------
Key: NH-2731
URL: http://216.121.112.228/browse/NH-2731
Project: NHibernate
Issue Type: Bug
Components: Core
Affects Versions: 3.2.0Beta1
Reporter: Patrick Earl
Limits that are set as parameters should be adjusted according to the UseMaxForLimit and OffsetStartsAtOne parameters. Consider also cases where constants and parameters are mixed.
--
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-24 05:16:43
|
[ http://216.121.112.228/browse/NH-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Earl updated NH-2730:
-----------------------------
Description:
There is a comment in the code about this.
http://www.firebirdsql.org/refdocs/langrefupd20-select.html#langrefupd20-first-skip
Summary: Fix Firebird's limit string to use rows instead of skip / first (was: Fix Firebird's limit string according to comment in code)
> Fix Firebird's limit string to use rows instead of skip / first
> ---------------------------------------------------------------
>
> Key: NH-2730
> URL: http://216.121.112.228/browse/NH-2730
> Project: NHibernate
> Issue Type: Improvement
> Components: DataProviders / Dialects
> Affects Versions: 3.2.0Beta1
> Reporter: Patrick Earl
>
> There is a comment in the code about this.
> http://www.firebirdsql.org/refdocs/langrefupd20-select.html#langrefupd20-first-skip
--
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-24 05:14:44
|
Fix Firebird's limit string according to comment in code
--------------------------------------------------------
Key: NH-2730
URL: http://216.121.112.228/browse/NH-2730
Project: NHibernate
Issue Type: Improvement
Components: DataProviders / Dialects
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: Patrick E. (JIRA) <nh...@gm...> - 2011-05-24 02:23:46
|
[ http://216.121.112.228/browse/NH-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21166#action_21166 ]
Patrick Earl commented on NH-2729:
----------------------------------
At the time of writing, this only affects SybaseASA9Dialect. It's not clear if anyone's really using this dialect any longer.
> Parameter values are not set using OffsetStartsAtOne
> ----------------------------------------------------
>
> Key: NH-2729
> URL: http://216.121.112.228/browse/NH-2729
> Project: NHibernate
> Issue Type: Bug
> Components: DataProviders / Dialects
> Affects Versions: 3.2.0Beta1
> Reporter: Patrick Earl
>
> While doing this, confirm that the limit parameters are also set properly according to dialect parameters.
--
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-24 02:21:44
|
Parameter values are not set using OffsetStartsAtOne
----------------------------------------------------
Key: NH-2729
URL: http://216.121.112.228/browse/NH-2729
Project: NHibernate
Issue Type: Bug
Components: DataProviders / Dialects
Affects Versions: 3.2.0Beta1
Reporter: Patrick Earl
While doing this, confirm that the limit parameters are also set properly according to dialect parameters.
--
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: Kelly S. (JIRA) <nh...@gm...> - 2011-05-24 02:07:43
|
[ http://216.121.112.228/browse/NH-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kelly Stuard updated NH-2728:
-----------------------------
Attachment: NH2728.zip
I think this is what you are looking for. Let me know if I can provide any additional information.
> ManyToAny missing from ICollectionElementRelation<TElement>
> -----------------------------------------------------------
>
> Key: NH-2728
> URL: http://216.121.112.228/browse/NH-2728
> Project: NHibernate
> Issue Type: Improvement
> Components: Mapping by-code
> Affects Versions: 3.2.0Beta1
> Reporter: Kelly Stuard
> Priority: Major
> Attachments: NH2728.zip
>
>
> When mapping collections through code, all the choices (OneToMany, ManyToMany, etc) are there, except one. Unfortunately, ManyToAny is not present.
> Of course, I discovered this because it is one that I'm trying to use.
--
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-23 23:08:40
|
[ http://216.121.112.228/browse/NH-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21164#action_21164 ]
Fabio Maulo commented on NH-2728:
---------------------------------
It is an improv. just because you can always map a class through XML.
The bug is when the mapping-by-code produce a not usable mapping.
> ManyToAny missing from ICollectionElementRelation<TElement>
> -----------------------------------------------------------
>
> Key: NH-2728
> URL: http://216.121.112.228/browse/NH-2728
> Project: NHibernate
> Issue Type: Improvement
> Components: Mapping by-code
> Affects Versions: 3.2.0Beta1
> Reporter: Kelly Stuard
> Priority: Major
>
> When mapping collections through code, all the choices (OneToMany, ManyToMany, etc) are there, except one. Unfortunately, ManyToAny is not present.
> Of course, I discovered this because it is one that I'm trying to use.
--
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-23 23:06:51
|
[ http://216.121.112.228/browse/NH-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21163#action_21163 ]
Fabio Maulo commented on NH-2728:
---------------------------------
Can you provide a little domain (2 or 3 classes) with its XML mapping ?
I would use it at least to fit your needs in the test.
Thanks.
> ManyToAny missing from ICollectionElementRelation<TElement>
> -----------------------------------------------------------
>
> Key: NH-2728
> URL: http://216.121.112.228/browse/NH-2728
> Project: NHibernate
> Issue Type: Improvement
> Components: Mapping by-code
> Affects Versions: 3.2.0Beta1
> Reporter: Kelly Stuard
> Priority: Major
>
> When mapping collections through code, all the choices (OneToMany, ManyToMany, etc) are there, except one. Unfortunately, ManyToAny is not present.
> Of course, I discovered this because it is one that I'm trying to use.
--
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: Kelly S. (JIRA) <nh...@gm...> - 2011-05-23 21:19:45
|
[ http://216.121.112.228/browse/NH-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21162#action_21162 ]
Kelly Stuard commented on NH-2728:
----------------------------------
I pondered, before submitting, if a difference in the feature set from hbm to code mapping was a bug or improvement. Now I know.
> ManyToAny missing from ICollectionElementRelation<TElement>
> -----------------------------------------------------------
>
> Key: NH-2728
> URL: http://216.121.112.228/browse/NH-2728
> Project: NHibernate
> Issue Type: Improvement
> Components: Mapping by-code
> Affects Versions: 3.2.0Beta1
> Reporter: Kelly Stuard
> Priority: Major
>
> When mapping collections through code, all the choices (OneToMany, ManyToMany, etc) are there, except one. Unfortunately, ManyToAny is not present.
> Of course, I discovered this because it is one that I'm trying to use.
--
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-23 21:04:42
|
[ http://216.121.112.228/browse/NH-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo updated NH-2728:
----------------------------
Issue Type: Improvement (was: Bug)
> ManyToAny missing from ICollectionElementRelation<TElement>
> -----------------------------------------------------------
>
> Key: NH-2728
> URL: http://216.121.112.228/browse/NH-2728
> Project: NHibernate
> Issue Type: Improvement
> Components: Mapping by-code
> Affects Versions: 3.2.0Beta1
> Reporter: Kelly Stuard
> Priority: Major
>
> When mapping collections through code, all the choices (OneToMany, ManyToMany, etc) are there, except one. Unfortunately, ManyToAny is not present.
> Of course, I discovered this because it is one that I'm trying to use.
--
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-23 20:11:48
|
[ http://216.121.112.228/browse/NH-2477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21161#action_21161 ]
Fabio Maulo commented on NH-2477:
---------------------------------
Test available in the trunk
> Count after Take return incorect value
> --------------------------------------
>
> Key: NH-2477
> URL: http://216.121.112.228/browse/NH-2477
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.GA
> Reporter: Sławomir Rosiek
> Priority: Minor
>
> The following query
> issues.Take(30).Count()
> return value greater than 30. It should return at most 30.
--
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: Kelly S. (JIRA) <nh...@gm...> - 2011-05-23 20:08:42
|
ManyToAny missing from ICollectionElementRelation<TElement>
-----------------------------------------------------------
Key: NH-2728
URL: http://216.121.112.228/browse/NH-2728
Project: NHibernate
Issue Type: Bug
Components: Mapping by-code
Affects Versions: 3.2.0Beta1
Reporter: Kelly Stuard
Priority: Major
When mapping collections through code, all the choices (OneToMany, ManyToMany, etc) are there, except one. Unfortunately, ManyToAny is not present.
Of course, I discovered this because it is one that I'm trying to use.
--
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-23 19:10:45
|
[ http://216.121.112.228/browse/NH-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo resolved NH-2317.
-----------------------------
Resolution: Fixed
Fix Version/s: 3.2.0CR1
> Select after Take does not work properly
> ----------------------------------------
>
> Key: NH-2317
> URL: http://216.121.112.228/browse/NH-2317
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.Alpha2
> Reporter: Jose F. Romaniello
> Priority: Major
> Fix For: 3.2.0CR1
>
> Attachments: NH2317.7z
>
>
> artists.Take(10).Select(a => a.Id) throws exception on
> NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) en PolymorphicQuerySourceDetector.cs: line 62
> artists.Select(a => a.Id).Take(10) works properly
> These two queries work 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-23 18:45:53
|
[ http://216.121.112.228/browse/NH-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21160#action_21160 ]
Fabio Maulo commented on NH-2317:
---------------------------------
The matter is not when the last sentence is just a select...
in that case it can be reduced.
In practice this HQL
select a.id from Artist a where a in (from Artist take 3)
can be reduce to this other
select a.id from Artist a take 3
The matter is when the clause after a skip/take has a body (re-linq meaning of it) as
Query<A>().Take(10).Where(x=> x.Name.StartWith("P"))
In this last case we have to transform it with a subquery (... where possible in HQL)
> Select after Take does not work properly
> ----------------------------------------
>
> Key: NH-2317
> URL: http://216.121.112.228/browse/NH-2317
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.Alpha2
> Reporter: Jose F. Romaniello
> Priority: Major
> Attachments: NH2317.7z
>
>
> artists.Take(10).Select(a => a.Id) throws exception on
> NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) en PolymorphicQuerySourceDetector.cs: line 62
> artists.Select(a => a.Id).Take(10) works properly
> These two queries work 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: Andrei A. (JIRA) <nh...@gm...> - 2011-05-23 17:43:52
|
[ http://216.121.112.228/browse/NH-2328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21159#action_21159 ]
Andrei Alecu commented on NH-2328:
----------------------------------
Ok, since I was pressed on time, I ended up with the following workaround which works:
public static class GetTypeFullNameExtension
{
public static string GetTypeFullName(this object what)
{
return what.GetType().FullName;
}
}
public class TypeIsGenerator : BaseHqlGeneratorForMethod
{
public TypeIsGenerator()
{
this.SupportedMethods = new[] { ReflectionHelper.GetMethodDefinition<object>(x => x.GetTypeFullName()) };
}
public override HqlTreeNode BuildHql(
MethodInfo method,
Expression targetObject,
ReadOnlyCollection<Expression> arguments,
HqlTreeBuilder treeBuilder,
IHqlExpressionVisitor visitor)
{
return treeBuilder.Dot(visitor.Visit(arguments[0]).AsExpression(), treeBuilder.Class());
}
}
After merging the generator in, I can now run this query:
var boxes =
(from t in s.Query<ToyBox>()
where t.Shape.GetTypeFullName() == typeof(Square).FullName
select t).ToList();
Which is sufficient for us for now.
> 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
> 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
|