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: Sergey K. (JIRA) <nh...@gm...> - 2011-05-19 12:49:52
|
.Where().Cast<>().OrderBy() query causes NotSupportedException -------------------------------------------------------------- Key: NH-2718 URL: http://216.121.112.228/browse/NH-2718 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.1.0 Reporter: Sergey Karpushev Attachments: CastWhere.patch patch for with a test and fix attached patch includes my fix for NH-2708 Test 'NHibernate.Test.Linq.ByMethod.CastTests.CastWhereFirstOrDefault' failed: System.NotSupportedException : Specified method is not supported. Hql\Ast\ANTLR\PolymorphicQuerySourceDetector.cs(61,0): at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) Hql\Ast\ANTLR\PolymorphicQuerySourceDetector.cs(27,0): at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.Process(IASTNode tree) Hql\Ast\ANTLR\AstPolymorphicProcessor.cs(30,0): at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process() Hql\Ast\ANTLR\AstPolymorphicProcessor.cs(24,0): at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process(IASTNode ast, ISessionFactoryImplementor factory) Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(33,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(27,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) Engine\Query\HQLExpressionQueryPlan.cs(34,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) Engine\Query\HQLExpressionQueryPlan.cs(23,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) Engine\Query\HQLExpressionQueryPlan.cs(17,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) Engine\Query\QueryPlanCache.cs(88,0): at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) Impl\AbstractSessionImpl.cs(312,0): at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) Impl\AbstractSessionImpl.cs(268,0): at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) Linq\NhQueryProvider.cs(43,0): at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) Linq\NhQueryProvider.cs(26,0): at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) Linq\NhQueryProvider.cs(103,0): at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) Linq\ByMethod\CastTests.cs(16,0): at NHibernate.Test.Linq.ByMethod.CastTests.CastWhereFirstOrDefault() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Sergey K. (JIRA) <nh...@gm...> - 2011-05-19 12:45:53
|
Count() after Cast<>() causes InvalidOperationException ------------------------------------------------------- Key: NH-2717 URL: http://216.121.112.228/browse/NH-2717 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.1.0 Reporter: Sergey Karpushev Priority: Major Attachments: CastCount.patch patch for with a test and fix attached Test 'NHibernate.Test.Linq.ByMethod.CastTests.CastCount' failed: System.InvalidOperationException : No coercion operator is defined between types 'System.Int32' and 'NHibernate.DomainModel.Northwind.Entities.Animal'. at System.Linq.Expressions.Expression.GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType) at System.Linq.Expressions.Expression.Convert(Expression expression, Type type) at Remotion.Data.Linq.Clauses.ResultOperators.CastResultOperator.GetNewItemExpression(Expression inputItemExpression) at Remotion.Data.Linq.Clauses.ResultOperators.CastResultOperator.GetOutputDataInfo(IStreamedDataInfo inputInfo) Linq\Visitors\QueryModelVisitor.cs(133,0): at NHibernate.Linq.Visitors.QueryModelVisitor.VisitResultOperator(ResultOperatorBase resultOperator, QueryModel queryModel, Int32 index) at Remotion.Data.Linq.Clauses.ResultOperatorBase.Accept(IQueryModelVisitor visitor, QueryModel queryModel, Int32 index) at Remotion.Data.Linq.QueryModelVisitorBase.VisitResultOperators(ObservableCollection`1 resultOperators, QueryModel queryModel) at Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel) Linq\Visitors\QueryModelVisitor.cs(108,0): at NHibernate.Linq.Visitors.QueryModelVisitor.Visit() Linq\Visitors\QueryModelVisitor.cs(59,0): at NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel queryModel, VisitorParameters parameters, Boolean root) Linq\NhLinqExpression.cs(67,0): at NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor sessionFactory) Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs(27,0): at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) Engine\Query\HQLExpressionQueryPlan.cs(34,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) Engine\Query\HQLExpressionQueryPlan.cs(23,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) Engine\Query\HQLExpressionQueryPlan.cs(17,0): at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) Engine\Query\QueryPlanCache.cs(88,0): at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) Impl\AbstractSessionImpl.cs(312,0): at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) Impl\AbstractSessionImpl.cs(268,0): at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) Linq\NhQueryProvider.cs(43,0): at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) Linq\NhQueryProvider.cs(26,0): at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) Linq\NhQueryProvider.cs(103,0): at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) at System.Linq.Queryable.Count[TSource](IQueryable`1 source) Linq\ByMethod\CastTests.cs(36,0): at NHibernate.Test.Linq.ByMethod.CastTests.CastCount() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Boyan T. (JIRA) <nh...@gm...> - 2011-05-19 08:56:51
|
Inconsistent behavior of one-to-one relation through PK with lazy="no-proxy" ----------------------------------------------------------------------------- Key: NH-2716 URL: http://216.121.112.228/browse/NH-2716 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.2.0Beta1 Reporter: Boyan Trushev This is a follow-up of the problem I described in #NH-2704. While I was debugging the issue there I found another problem that concerns the case when the one-to-one relation is though PK and lazy is set to "no-proxy". The issue can be easily reproduced with the existing LazyOneToOne test case. You just have to duplicate the assert that checks if p2.Employee is null: p2 = s.CreateQuery("from Person where name='Emmanuel'").UniqueResult<Person>(); Assert.That(p2.Employee, Is.Null); Assert.That(p2.Employee, Is.Null); If you run the Lazy() test case now you will see that it fails on the second assert. On the first "Assert" the Employee property returns null as it is still not loaded (not contained in loadedUnwrapProxyFieldNames) and the EmployeeProxy which is contained in the field is unwrapped. After the first access however the fieldName is added to loadedUnwrapProxyFieldNames and on the next property access the EmployeeProxy is no more unwrapped. -- 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: Boyan T. (JIRA) <nh...@gm...> - 2011-05-19 08:34:51
|
Lazy="proxy" does eager load on one-to-one relation through PK -------------------------------------------------------------- Key: NH-2715 URL: http://216.121.112.228/browse/NH-2715 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.2.0Beta1 Reporter: Boyan Trushev Priority: Minor Hi, This is a follow-up of the problem I described in #NH-2704. There I found that when one-to-one relation is through FK the related property is eagerly loaded. I have been told that this is an expected behavior for one-to-one relation through FK, so I decided to examine also the case when the one-to-one relation is through PK. I have found the same problem there too. It can be easily reproduced with the LazyOneToOne test case. You just have to change lazy="no-proxy" to lazy="proxy" for Employee property of the Person class and for Person property of Employee class in Person.hbm.xml and run the Lazy() test. You'll notice that both the person and it's employee property are loaded on: p = s.CreateQuery("from Person where name='Gavin'").UniqueResult<Person>(); And on the next line the test fails as the Employee property was alredy loaded: Assert.That(!NHibernateUtil.IsPropertyInitialized(p, "Employee")); -- 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: Dave W. (JIRA) <nh...@gm...> - 2011-05-19 08:07:51
|
Properties mapped inside a <properties> group are not set when retrieving object -------------------------------------------------------------------------------- Key: NH-2714 URL: http://216.121.112.228/browse/NH-2714 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.1.0 Reporter: Dave Warry Attachments: CompositePropertyRefTest.zip See the attached failing test. Class A has two properties (Name, ExtraId) mapped within a <properties> group. Retrieving an instance of A returns an instance without these properties being set. Some preliminary debugging shows that two instances of A are being created by the call to Session.Get(). The first is being correctly inititalised; the second (which is the instance actually returned) isn't. -- 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: Boyan T. (JIRA) <nh...@gm...> - 2011-05-19 06:40:59
|
[ http://216.121.112.228/browse/NH-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21126#action_21126 ] Boyan Trushev commented on NH-2704: ----------------------------------- I think we are in some sort of misunderstanding here... So let me try to explain my idea with the example I gave in the test case from my first attachment. Let's have a Person entity which has one-to-one relation to an Employee: <class name="Person"> <id name="Id" type="int"> <generator class="identity" /> </id> <property name="Name"/> <one-to-one name="Employee" lazy="proxy" property-ref="Person" fetch="select" /> </class> public class Person { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual Employee Employee { get; set; } } When a person object is loaded from the database the following query is created: SELECT person0_.Id as Id0_0_, person0_.Name as Name0_0_ FROM Person person0_ WHERE person0_.Id=@p0; The Employee property should not be initialized on that stage. Now if the Employee property is accessed, the person proxy finds that the property is not initialized and produces a query like that to initialize it: SELECT employee0_.Id as Id1_0_, employee0_.PersonName as PersonName1_0_, employee0_.Person as Person1_0_ FROM Employee employee0_ WHERE employee0_.Person=@p0; @p0 is the person id. With the current NH version both queries are executed on loading of the person object - the Employee property is eagerly loaded. With the patch I proposed it works exactly as I described and IMHO this is the correct behavior. Hope it is now clear what I'm trying to explain and why I have opened the ticket. > Bidirectional one-to-one relation through FK (using property-ref) proxiable > --------------------------------------------------------------------------- > > Key: NH-2704 > URL: http://216.121.112.228/browse/NH-2704 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.2.0Alpha3 > Reporter: Boyan Trushev > Priority: Minor > Attachments: NH2704.patch, NH2704_fix.patch > > > Hi, > In our project we use one-to-one relations that are not referencing same primary key, instead property-ref is used to specify the referenced property. In this case however we have noticed that lazy="proxy" doesn't work as expected - the "lazy" objects are eagerly loaded on loading of the parent objec -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Anupam M. (JIRA) <nh...@gm...> - 2011-05-19 05:35:52
|
When calling Oracle stored procedure with Custom Type as parameter , NHibernate is throwing exception. where as with MS SQL Server 2008 it is working. ------------------------------------------------------------------------------------------------------------------------------------------------------- Key: NH-2713 URL: http://216.121.112.228/browse/NH-2713 Project: NHibernate Issue Type: Bug Components: Core, DataProviders / Dialects Affects Versions: 3.0.0.GA Reporter: Anupam Mishra Attachments: Oracle Exception.txt Please check the attached Exception while calling Oracle Stored Procedure . Class which implement IType using System; using System.Collections.Generic; using System.Text; using NHibernate.Type; using NHibernate.SqlTypes; using System.Data; using NHibernate; using System.Data.SqlClient; using Oracle.DataAccess.Client; namespace DomainObject { public class Sql2008Structured : IType { private static readonly SqlType[] x = new[] { new SqlType(DbType.Object) }; public SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) { return x; } public bool IsCollectionType { get { return true; } } public int GetColumnSpan(NHibernate.Engine.IMapping mapping) { return 1; } #region IType Members public int Compare(object x, object y, EntityMode? entityMode) { throw new NotImplementedException(); } public object DeepCopy(object val, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public object FromXMLNode(System.Xml.XmlNode xml, NHibernate.Engine.IMapping factory) { throw new NotImplementedException(); } public int GetHashCode(object x, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public int GetHashCode(object x, EntityMode entityMode) { throw new NotImplementedException(); } public IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public object Hydrate(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public bool IsAnyType { get { throw new NotImplementedException(); } } public bool IsAssociationType { get { throw new NotImplementedException(); } } public bool IsComponentType { get { throw new NotImplementedException(); } } public bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public bool IsEntityType { get { throw new NotImplementedException(); } } public bool IsEqual(object x, object y, EntityMode entityMode, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public bool IsEqual(object x, object y, EntityMode entityMode) { throw new NotImplementedException(); } public bool IsModified(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public bool IsMutable { get { throw new NotImplementedException(); } } public bool IsSame(object x, object y, EntityMode entityMode) { throw new NotImplementedException(); } public bool IsXMLElement { get { throw new NotImplementedException(); } } public string Name { get { throw new NotImplementedException(); } } public object NullSafeGet(IDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public object NullSafeGet(IDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public void NullSafeSet(IDbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) { var s = st as SqlCommand; if (s != null) { s.Parameters[index].SqlDbType = SqlDbType.Structured; s.Parameters[index].TypeName = "EmployeeType"; s.Parameters[index].Value = value; } else { var o = st as OracleCommand; o.Parameters[index].OracleDbType = OracleDbType.Array; o.Parameters[index].UdtTypeName = "TESTTYPE"; o.Parameters[index].Value = value; } } public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, ForeignKeyDirection foreignKeyDirection) { throw new NotImplementedException(); } public object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) { throw new NotImplementedException(); } public object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public Type ReturnedClass { get { throw new NotImplementedException(); } } public object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public void SetToXMLNode(System.Xml.XmlNode node, object value, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } public bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) { throw new NotImplementedException(); } public string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) { throw new NotImplementedException(); } #endregion #region ICacheAssembler Members public object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } public void BeforeAssemble(object cached, NHibernate.Engine.ISessionImplementor session) { throw new NotImplementedException(); } public object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) { throw new NotImplementedException(); } #endregion #region IType Members public void NullSafeSet(IDbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) { var s = st as SqlCommand; if (s != null) { s.Parameters[index].SqlDbType = SqlDbType.Structured; s.Parameters[index].TypeName = "EmployeeType"; s.Parameters[index].Value = value; } else { var o = st as OracleCommand; o.Parameters[index].OracleDbType = OracleDbType.Array; o.Parameters[index].UdtTypeName = "TESTTYPE"; o.Parameters[index].Value = value; } } #endregion } public static class StructuredExtensions { private static readonly Sql2008Structured structured = new Sql2008Structured(); public static IQuery SetStructured(this IQuery query, string name, DataTable dt) { return query.SetParameter(name, dt, structured); } public static IQuery SetOracleStructured(this IQuery query, string name, Object[] dt) { return query.SetParameter(name, dt, structured); } } } Type defined in Oracle create or replace TYPE employeeType AS OBJECT (employeeId INT, employeeName VARCHAR2 (50)); *************** create or replace TYPE TESTTYPE AS TABLE OF EMPLOYEETYPE; Stored Procedure create or replace PROCEDURE TESTCUSTOMEMPLOYEE (PARAM1 OUT SYS_REFCURSOR,PARAM IN TESTTYPE) IS BEGIN open PARAM1 for SELECT EMP_ID,EMP_NAME,EMP_PASSWORD,TEAM_ASSOCIATED_WITH,IS_CAPTAIN,NO_OF_MOM,BALANCE FROM employee; END; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Vahid N. (JIRA) <nh...@gm...> - 2011-05-19 04:36:01
|
[ http://216.121.112.228/browse/NH-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21125#action_21125 ] Vahid Nasiri commented on NH-2712: ---------------------------------- I think it should similar to: https://www.re-motion.org/blogs/mix/2010/07/15/support-for-vb-specific-string-comparisons-in-re-linq + https://www.re-motion.org/blogs/mix/2009/10/16/vb.net-specific-text-comparison-in-linq-queries > queryover doesn't support enums in VB.NET > ----------------------------------------- > > Key: NH-2712 > URL: http://216.121.112.228/browse/NH-2712 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.Beta2 > Reporter: Matthew Beer > Assignee: Patrick Earl > Priority: Major > Fix For: 3.1.0 > > > Comparing enums in a Linq query with VB.NET throws a NotSupportedException: > Return (From invoice In session.Query(Of Invoice)() > Where invoice.Payment.ElectronicInvoiceStatus = ElectronicInvoiceStatus.Unpaid > Select invoice).Any() > Message: ConvertChecked([-1].Payment.ElectronicInvoiceStatus) > Stack Trace: > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitUnaryExpression(UnaryExpression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitBinaryExpression(BinaryExpression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.Visit(Expression expression, VisitorParameters parameters) > at NHibernate.Linq.Visitors.QueryModelVisitor.VisitWhereClause(WhereClause whereClause, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.Clauses.WhereClause.Accept(IQueryModelVisitor visitor, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitBodyClauses(ObservableCollection`1 bodyClauses, QueryModel queryModel) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel) > at NHibernate.Linq.Visitors.QueryModelVisitor.Visit() > at NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel queryModel, VisitorParameters parameters, Boolean root) > at NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor sessionFactory) > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at System.Linq.Queryable.Any[TSource](IQueryable`1 source) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Matthew B. (JIRA) <nh...@gm...> - 2011-05-19 00:17:57
|
[ http://216.121.112.228/browse/NH-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21124#action_21124 ] Matthew Beer commented on NH-2712: ---------------------------------- queryover enum support for VB.NET still seems to be missing. Issue [NH-2407] marks the issue closed for the LINQ provider. > queryover doesn't support enums in VB.NET > ----------------------------------------- > > Key: NH-2712 > URL: http://216.121.112.228/browse/NH-2712 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.Beta2 > Reporter: Matthew Beer > Assignee: Patrick Earl > Priority: Major > Fix For: 3.1.0 > > > Comparing enums in a Linq query with VB.NET throws a NotSupportedException: > Return (From invoice In session.Query(Of Invoice)() > Where invoice.Payment.ElectronicInvoiceStatus = ElectronicInvoiceStatus.Unpaid > Select invoice).Any() > Message: ConvertChecked([-1].Payment.ElectronicInvoiceStatus) > Stack Trace: > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitUnaryExpression(UnaryExpression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitBinaryExpression(BinaryExpression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) > at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.Visit(Expression expression, VisitorParameters parameters) > at NHibernate.Linq.Visitors.QueryModelVisitor.VisitWhereClause(WhereClause whereClause, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.Clauses.WhereClause.Accept(IQueryModelVisitor visitor, QueryModel queryModel, Int32 index) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitBodyClauses(ObservableCollection`1 bodyClauses, QueryModel queryModel) > at Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel) > at NHibernate.Linq.Visitors.QueryModelVisitor.Visit() > at NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel queryModel, VisitorParameters parameters, Boolean root) > at NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor sessionFactory) > at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) > at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) > at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) > at System.Linq.Queryable.Any[TSource](IQueryable`1 source) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Matthew B. (JIRA) <nh...@gm...> - 2011-05-19 00:13:54
|
queryover doesn't support enums in VB.NET ----------------------------------------- Key: NH-2712 URL: http://216.121.112.228/browse/NH-2712 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.0.0.Beta2 Reporter: Matthew Beer Assignee: Patrick Earl Priority: Major Fix For: 3.1.0 Comparing enums in a Linq query with VB.NET throws a NotSupportedException: Return (From invoice In session.Query(Of Invoice)() Where invoice.Payment.ElectronicInvoiceStatus = ElectronicInvoiceStatus.Unpaid Select invoice).Any() Message: ConvertChecked([-1].Payment.ElectronicInvoiceStatus) Stack Trace: at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitUnaryExpression(UnaryExpression expression) at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitBinaryExpression(BinaryExpression expression) at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression) at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.Visit(Expression expression, VisitorParameters parameters) at NHibernate.Linq.Visitors.QueryModelVisitor.VisitWhereClause(WhereClause whereClause, QueryModel queryModel, Int32 index) at Remotion.Data.Linq.Clauses.WhereClause.Accept(IQueryModelVisitor visitor, QueryModel queryModel, Int32 index) at Remotion.Data.Linq.QueryModelVisitorBase.VisitBodyClauses(ObservableCollection`1 bodyClauses, QueryModel queryModel) at Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel) at NHibernate.Linq.Visitors.QueryModelVisitor.Visit() at NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel queryModel, VisitorParameters parameters, Boolean root) at NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor sessionFactory) at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) at NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String expressionStr, IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) at NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery) at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression) at System.Linq.Queryable.Any[TSource](IQueryable`1 source) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ricardo P. (JIRA) <nh...@gm...> - 2011-05-18 20:27:49
|
Support COALESCE in HQL ----------------------- Key: NH-2711 URL: http://216.121.112.228/browse/NH-2711 Project: NHibernate Issue Type: New Feature Components: Core Affects Versions: 3.2.0Beta1, 3.2.0Alpha3, 3.2.0Alpha2, 3.2.0Alpha1, 3.1.0, 3.0.0.GA, 3.0.0.CR1, 3.0.0.Beta2, 3.0.0.Beta1, 3.0.0.Alpha3, 3.0.0.Alpha2, 3.0.0.Alpha1, 2.1.2.GA, 2.1.1.GA, 2.0.1.GA, 1.2.1 Reporter: Ricardo Peres SQL standard defines the COALESCE operator, which should be implemented in most DBs. HQL should implement it. I know we can always define it in a custom Dialect, but since this is standard, I think it should be supported by the core. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ricardo P. (JIRA) <nh...@gm...> - 2011-05-18 20:15:52
|
[ http://216.121.112.228/browse/NH-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21123#action_21123 ] Ricardo Peres commented on NH-2710: ----------------------------------- OK for multiquery (where the DB supports it), but there is an big difference between OR and UNION in most DB servers. As for joining the results with LINQ to Objects, it is only viable if the queries do not return many results, and, of course, the server already filters duplicates, unless using UNION ALL. I am using this and I have to use SQL queries. I agree, perhaps it's not a critical functionality, but, IMO, it is useful. > Support Unions on HQL > --------------------- > > Key: NH-2710 > URL: http://216.121.112.228/browse/NH-2710 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > HQL should support the UNION keyword, since it provides better performance on most DBs than OR clauses. -- 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-18 20:09:52
|
[ http://216.121.112.228/browse/NH-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21122#action_21122 ] Patrick Earl commented on NH-2702: ---------------------------------- Speak with Fabio about a patch after fixing this. > Support HQL pagination with parameters > -------------------------------------- > > Key: NH-2702 > URL: http://216.121.112.228/browse/NH-2702 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.2.0Alpha3 > Reporter: Patrick Earl > Assignee: Patrick Earl > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-18 20:04:52
|
[ http://216.121.112.228/browse/NH-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21121#action_21121 ] Fabio Maulo commented on NH-2710: --------------------------------- To take that result the UNION is completely unneeded. 1) from Entity e where e.Type = 1 or e.Type = 2 2) you can use multiquery and union the result in RAM using a very simple LINQ to object expression. Try again with another example. > Support Unions on HQL > --------------------- > > Key: NH-2710 > URL: http://216.121.112.228/browse/NH-2710 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > HQL should support the UNION keyword, since it provides better performance on most DBs than OR clauses. -- 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-18 18:08:52
|
[ http://216.121.112.228/browse/NH-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21120#action_21120 ] Ricardo Peres commented on NH-2710: ----------------------------------- from Entity e where e.Type = 1 union from Entity e where e.Type = 2 > Support Unions on HQL > --------------------- > > Key: NH-2710 > URL: http://216.121.112.228/browse/NH-2710 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > HQL should support the UNION keyword, since it provides better performance on most DBs than OR clauses. -- 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-18 17:53:57
|
[ http://216.121.112.228/browse/NH-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21119#action_21119 ] Fabio Maulo commented on NH-2710: --------------------------------- to do what ? > Support Unions on HQL > --------------------- > > Key: NH-2710 > URL: http://216.121.112.228/browse/NH-2710 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > HQL should support the UNION keyword, since it provides better performance on most DBs than OR clauses. -- 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-18 17:53:49
|
[ http://216.121.112.228/browse/NH-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2710: ---------------------------- Affects Version/s: (was: 3.2.0Alpha3) (was: 3.2.0Alpha2) (was: 3.2.0Alpha1) (was: 3.0.0.GA) (was: 3.0.0.CR1) (was: 3.0.0.Beta2) (was: 3.0.0.Beta1) (was: 3.0.0.Alpha3) (was: 3.0.0.Alpha2) (was: 2.1.2.GA) (was: 2.1.1.GA) (was: 3.0.0.Alpha1) (was: 2.0.1.GA) (was: 1.2.1) > Support Unions on HQL > --------------------- > > Key: NH-2710 > URL: http://216.121.112.228/browse/NH-2710 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.1.0 > Reporter: Ricardo Peres > > HQL should support the UNION keyword, since it provides better performance on most DBs than OR clauses. -- 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-18 15:46:49
|
Support Unions on HQL --------------------- Key: NH-2710 URL: http://216.121.112.228/browse/NH-2710 Project: NHibernate Issue Type: New Feature Components: Core Affects Versions: 3.2.0Alpha3, 3.2.0Alpha2, 3.2.0Alpha1, 3.1.0, 3.0.0.GA, 3.0.0.CR1, 3.0.0.Beta2, 3.0.0.Beta1, 3.0.0.Alpha3, 3.0.0.Alpha2, 3.0.0.Alpha1, 2.1.2.GA, 2.1.1.GA, 2.0.1.GA, 1.2.1 Reporter: Ricardo Peres HQL should support the UNION keyword, since it provides better performance on most DBs than OR clauses. -- 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-18 14:57:57
|
[ http://216.121.112.228/browse/NH-2396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21118#action_21118 ] Fabio Maulo commented on NH-2396: --------------------------------- async thread ? do you mean another thread than the one have ran the query ? > SqlQuery cannot be cancelled > ---------------------------- > > Key: NH-2396 > URL: http://216.121.112.228/browse/NH-2396 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.0.1.GA > Reporter: Wilfried PILON > Priority: Major > > Plateform : .NET 3.5, NH 2.0.1GA, Nhibernate.Driver.SqlClientDriver, MS SQLServer 2005 > Description : ISession.CancelQuery() does not work with custom SQL Query > The query is excuted with : > IQuery query = session.CreateSQLQuery("exec ps_LongOperation"); > query.ExecuteUpdate(); > If an async thread call session.CancelQuery(), the query is still running on SQL Server. > To solve the problem, I have to modify AbstractBatcher.PrepareCommand(CommandType type, SqlString sql, SqlType[] parameterTypes) like AbstractBatcher.PrepareQueryCommand(CommandType type, SqlString sql, SqlType[] parameterTypes) > The change store the current IDbCommand in lastQuery property. > public IDbCommand PrepareCommand(CommandType type, SqlString sql, SqlType[] parameterTypes) > { > OnPreparedCommand(); > > // do not actually prepare the Command here - instead just generate it because > // if the command is associated with an ADO.NET Transaction/Connection while > // another open one Command is doing something then an exception will be > // thrown. > IDbCommand command = Generate(type, sql, parameterTypes); > lastQuery = command; > return command; > } -- 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-18 14:30:56
|
[ http://216.121.112.228/browse/NH-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21117#action_21117 ] Fabio Maulo commented on NH-2704: --------------------------------- In the proxy you have the ID of the PK of the other object, not the value representing the relation (the property-ref has that value). > Bidirectional one-to-one relation through FK (using property-ref) proxiable > --------------------------------------------------------------------------- > > Key: NH-2704 > URL: http://216.121.112.228/browse/NH-2704 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.2.0Alpha3 > Reporter: Boyan Trushev > Priority: Minor > Attachments: NH2704.patch, NH2704_fix.patch > > > Hi, > In our project we use one-to-one relations that are not referencing same primary key, instead property-ref is used to specify the referenced property. In this case however we have noticed that lazy="proxy" doesn't work as expected - the "lazy" objects are eagerly loaded on loading of the parent objec -- 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-18 14:08:07
|
[ http://216.121.112.228/browse/NH-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2705. --------------------------- Resolution: Won't Fix > Linq/Hql/Criteria Fetch on class hierarchy generates invalid SQL when derivees mix component and many-to-one mappings > --------------------------------------------------------------------------------------------------------------------- > > Key: NH-2705 > URL: http://216.121.112.228/browse/NH-2705 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Priority: Minor > Attachments: nh2705 test.patch > > > Consider the following scenario: > public class ItemBase > { > public virtual int Id { get; set; } > public virtual SubItemBase SubItem { get; set; } > } > public class ItemWithComponentSubItem:ItemBase { } > > public class ItemWithManyToOneSubItem:ItemBase { } > ItemWithComponentSubItem defines in its mapping that SubItem is a component of SubItemComponent type (which derives from SubItemBase) > ItemWithManyToOneSubItem defines in its mapping that SubItem is a many-to-one of SubItemEntity type (again, derives from SubItemBase) > Running the following query with fetch results in invalid SQL being executed: > from ItemBase i left join fetch i.SubItem > Removing the fetch makes it work properly. > from ItemBase i > Also, this works: > from ItemWithManyToOneSubItem i left join fetch i.SubItem > But this doesn't: > from ItemWithComponentSubItem i left join fetch i.SubItem (one would argue there's nothing to fetch here, but instead of throwing an exception, the fetch instruction should just be ignored and maybe a warning logged, it would allow for much better reuse of code) > I will attach a unit test that demonstrates this bug, and also a related one at NH-2615. > I believe the correct behavior here is to allow fetch on components, and simply ignore it rather than throwing an exception. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-18 14:08:00
|
[ http://216.121.112.228/browse/NH-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2705: ---------------------------- Fix Version/s: (was: 3.2.0Beta1) > Linq/Hql/Criteria Fetch on class hierarchy generates invalid SQL when derivees mix component and many-to-one mappings > --------------------------------------------------------------------------------------------------------------------- > > Key: NH-2705 > URL: http://216.121.112.228/browse/NH-2705 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Priority: Minor > Attachments: nh2705 test.patch > > > Consider the following scenario: > public class ItemBase > { > public virtual int Id { get; set; } > public virtual SubItemBase SubItem { get; set; } > } > public class ItemWithComponentSubItem:ItemBase { } > > public class ItemWithManyToOneSubItem:ItemBase { } > ItemWithComponentSubItem defines in its mapping that SubItem is a component of SubItemComponent type (which derives from SubItemBase) > ItemWithManyToOneSubItem defines in its mapping that SubItem is a many-to-one of SubItemEntity type (again, derives from SubItemBase) > Running the following query with fetch results in invalid SQL being executed: > from ItemBase i left join fetch i.SubItem > Removing the fetch makes it work properly. > from ItemBase i > Also, this works: > from ItemWithManyToOneSubItem i left join fetch i.SubItem > But this doesn't: > from ItemWithComponentSubItem i left join fetch i.SubItem (one would argue there's nothing to fetch here, but instead of throwing an exception, the fetch instruction should just be ignored and maybe a warning logged, it would allow for much better reuse of code) > I will attach a unit test that demonstrates this bug, and also a related one at NH-2615. > I believe the correct behavior here is to allow fetch on components, and simply ignore it rather than throwing an exception. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-18 14:07:52
|
[ http://216.121.112.228/browse/NH-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reopened NH-2705: ----------------------------- Assignee: (was: Fabio Maulo) > Linq/Hql/Criteria Fetch on class hierarchy generates invalid SQL when derivees mix component and many-to-one mappings > --------------------------------------------------------------------------------------------------------------------- > > Key: NH-2705 > URL: http://216.121.112.228/browse/NH-2705 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Priority: Minor > Attachments: nh2705 test.patch > > > Consider the following scenario: > public class ItemBase > { > public virtual int Id { get; set; } > public virtual SubItemBase SubItem { get; set; } > } > public class ItemWithComponentSubItem:ItemBase { } > > public class ItemWithManyToOneSubItem:ItemBase { } > ItemWithComponentSubItem defines in its mapping that SubItem is a component of SubItemComponent type (which derives from SubItemBase) > ItemWithManyToOneSubItem defines in its mapping that SubItem is a many-to-one of SubItemEntity type (again, derives from SubItemBase) > Running the following query with fetch results in invalid SQL being executed: > from ItemBase i left join fetch i.SubItem > Removing the fetch makes it work properly. > from ItemBase i > Also, this works: > from ItemWithManyToOneSubItem i left join fetch i.SubItem > But this doesn't: > from ItemWithComponentSubItem i left join fetch i.SubItem (one would argue there's nothing to fetch here, but instead of throwing an exception, the fetch instruction should just be ignored and maybe a warning logged, it would allow for much better reuse of code) > I will attach a unit test that demonstrates this bug, and also a related one at NH-2615. > I believe the correct behavior here is to allow fetch on components, and simply ignore it rather than throwing an exception. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Andrei A. (JIRA) <nh...@gm...> - 2011-05-18 09:23:57
|
[ http://216.121.112.228/browse/NH-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21116#action_21116 ] Andrei Alecu commented on NH-2705: ---------------------------------- I reviewed the fix, but it seems to be only for NH-2615. This particular issue (NH-2705) isn't fixed. You seem to have removed the relevant tests that were pertaining to it, so that unit test folder should instead be NH2615. :) So, even if this isn't supported (although everything else seems to work except for when Fetch is used), I think this one shouldn't be marked fixed, because that query still generates invalid sql. Maybe "won't fix"/"by design", or maybe let it stay open if someone wants to still fix it some time in the future. However, in my case, I was mainly interested in NH-2615, so - thanks Fabio! :) > Linq/Hql/Criteria Fetch on class hierarchy generates invalid SQL when derivees mix component and many-to-one mappings > --------------------------------------------------------------------------------------------------------------------- > > Key: NH-2705 > URL: http://216.121.112.228/browse/NH-2705 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Assignee: Fabio Maulo > Priority: Minor > Fix For: 3.2.0Beta1 > > Attachments: nh2705 test.patch > > > Consider the following scenario: > public class ItemBase > { > public virtual int Id { get; set; } > public virtual SubItemBase SubItem { get; set; } > } > public class ItemWithComponentSubItem:ItemBase { } > > public class ItemWithManyToOneSubItem:ItemBase { } > ItemWithComponentSubItem defines in its mapping that SubItem is a component of SubItemComponent type (which derives from SubItemBase) > ItemWithManyToOneSubItem defines in its mapping that SubItem is a many-to-one of SubItemEntity type (again, derives from SubItemBase) > Running the following query with fetch results in invalid SQL being executed: > from ItemBase i left join fetch i.SubItem > Removing the fetch makes it work properly. > from ItemBase i > Also, this works: > from ItemWithManyToOneSubItem i left join fetch i.SubItem > But this doesn't: > from ItemWithComponentSubItem i left join fetch i.SubItem (one would argue there's nothing to fetch here, but instead of throwing an exception, the fetch instruction should just be ignored and maybe a warning logged, it would allow for much better reuse of code) > I will attach a unit test that demonstrates this bug, and also a related one at NH-2615. > I believe the correct behavior here is to allow fetch on components, and simply ignore it rather than throwing an exception. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Richard B. (JIRA) <nh...@gm...> - 2011-05-18 08:37:48
|
[ http://216.121.112.228/browse/NH-2709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Brown reassigned NH-2709: --------------------------------- Assignee: Richard Brown > Doin Bitwise operation in QueryOver throw an exception > ------------------------------------------------------ > > Key: NH-2709 > URL: http://216.121.112.228/browse/NH-2709 > Project: NHibernate > Issue Type: Bug > Components: QueryOver > Affects Versions: 3.2.0Alpha2 > Reporter: Luka Cetina > Assignee: Richard Brown > Priority: Minor > Attachments: Test.cs > > > When doing Bitwise comparison in QueryOver.where, throws an Exception: > System.Exception was unhandled by user code > Message=Could not determine member from (Convert(a.AccessMask) & 2) > Source=NHibernate > StackTrace: > at NHibernate.Impl.ExpressionProcessor.FindMemberExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 189 > at NHibernate.Impl.ExpressionProcessor.FindMemberExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 170 > at NHibernate.Impl.ExpressionProcessor.FindMemberExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 170 > at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(Expression left, Expression right, ExpressionType nodeType) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 323 > at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(BinaryExpression be) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 318 > at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 415 > at NHibernate.Impl.ExpressionProcessor.ProcessExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 486 > at NHibernate.Impl.ExpressionProcessor.ProcessLambdaExpression(LambdaExpression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 493 > at NHibernate.Impl.ExpressionProcessor.ProcessExpression[T](Expression`1 expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 504 > at NHibernate.Criterion.QueryOver`2.Add(Expression`1 expression) in c:\Libs\NHibernate\src\NHibernate\Criterion\QueryOver.cs:line 749 > at NHibernate.Criterion.QueryOver`2.Where(Expression`1 expression) in c:\Libs\NHibernate\src\NHibernate\Criterion\QueryOver.cs:line 357 > at Test.Domain.NHMappingTest.Test() in C:\Projects\SDW\05A_Development\Softworks.Selfridges.Test\Domain\DummyTest.cs:line 45 > 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 |