Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2.0.GA
    • Fix Version/s: 3.3.0.CR1
    • Component/s: Core
    • Labels:
    • Sprint:

      Description

      With the new 3.2.0-GA release the support for Informix seems to be broken. I've tried the ODBC driver as well as the DRDA one.

      public void QueryByCriteria()
      {
      using (new TransactionScopeFixture())
      {
      using (Repository testObject = fixture.CreateTestObject())

      { int masterId = fixture.SetupQueryByCriteriaWithWhereClauseByNHibernate(); // inserts a "Library" object into the DB and return its id. testObject.QueryByCriteria(l => l.Id == libraryId).First(); }

      }
      }

      Repository:

      public IList<T> QueryByCriteria(Expression<Func<T, bool>> predicate)

      { var query = from item in Queryable .Where(predicate) select item; return query.ToList(); }

      public IQueryable<T> Queryable
      {
      get

      { return NHibernateSession.Query<T>(); }

      }

      Domain class:

      internal class Library
      {
      public Library()

      { Books = new List<Book>(); }

      public virtual int Id

      { get; set; }
      public virtual string Name { get; set; }

      public virtual IList<Book> Books

      { get; protected internal set; }

      }

      Mapping:

      internal sealed class LibraryMapping : ClassMapping<Library>
      {
      public LibraryMapping()
      {
      Table(TableInfos.Library.TableName);

      Id(x => x.Id, map =>

      { map.Column(TableInfos.Library.IdColumnName); map.Generator(Generators.Identity); }

      );

      Property(x => x.Name, map =>
      map.Column(TableInfos.Library.NameColumnName)
      );

      Bag(x => x.Books, cm => cm.Inverse(true), map => map.OneToMany());
      }
      }

      Schleupen.CS.SY.NHibernate.Tests.RepositoryTest.QueryByCriteria:
      NHibernate.Exceptions.GenericADOException : could not execute query
      [ select library0_.SYLIB_ID as SYLIB1_184_, library0_.SYLIBNAME as SYLIBNAME184_ from SYLIBRARY library0_ where library0_.SYLIB_ID=? ]
      Name:p1 - Value:1
      [SQL: select library0_.SYLIB_ID as SYLIB1_184_, library0_.SYLIBNAME as SYLIBNAME184_ from SYLIBRARY library0_ where library0_.SYLIB_ID=?]
      ----> System.IndexOutOfRangeException : Ungültiger Index 0 für OdbcParameterCollection mit Count=0.

      bei NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
      bei NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)
      bei NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes)
      bei NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session, QueryParameters queryParameters)
      bei NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters)
      bei NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results)
      bei NHibernate.Impl.SessionImpl.List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results)
      bei NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression, QueryParameters parameters)
      bei NHibernate.Impl.ExpressionQueryImpl.List()
      bei NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery)
      bei NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)
      bei NHibernate.Linq.DefaultQueryProvider.ExecuteTResult(Expression expression)
      bei Remotion.Linq.QueryableBase`1.GetEnumerator()
      bei System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
      bei System.Linq.Enumerable.ToListTSource(IEnumerable`1 source)
      bei Schleupen.CS.SY.NHibernate.Repository`2.ExecuteQuery(IEnumerable`1 query) in D:\entwicklung\Basis\CS.SY\FV2012\Baseline\Quellen\CFw\scsy_BaseLibrary\NHibernate\Repository.cs:Zeile 436.
      bei Schleupen.CS.SY.NHibernate.Repository`2.QueryByCriteria(Expression`1 predicate) in D:\entwicklung\Basis\CS.SY\FV2012\Baseline\Quellen\CFw\scsy_BaseLibrary\NHibernate\Repository.cs:Zeile 431.
      bei Schleupen.CS.SY.NHibernate.Tests.RepositoryTest.<>c_DisplayClass12.<QueryByCriteria>b_f() in D:\entwicklung\Basis\CS.SY\FV2012\Baseline\Quellen\CFw\scsy_BaseLibrary\NHibernate\Tests\RepositoryTest.cs:Zeile 349.
      bei Schleupen.CS.SY.NHibernate.Tests.RepositoryTest.Fixture.WithLogger(IInternalLogger logger, Action action) in D:\entwicklung\Basis\CS.SY\FV2012\Baseline\Quellen\CFw\scsy_BaseLibrary\NHibernate\Tests\RepositoryTest.Fixture.cs:Zeile 336.
      bei Schleupen.CS.SY.NHibernate.Tests.RepositoryTest.QueryByCriteria() in D:\entwicklung\Basis\CS.SY\FV2012\Baseline\Quellen\CFw\scsy_BaseLibrary\NHibernate\Tests\RepositoryTest.cs:Zeile 345.
      --IndexOutOfRangeException
      bei System.Data.Odbc.OdbcParameterCollection.RangeCheck(Int32 index)
      bei System.Data.Odbc.OdbcParameterCollection.GetParameter(Int32 index)
      bei System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item(Int32 index)
      bei NHibernate.Driver.DriverBase.ExpandQueryParameters(IDbCommand cmd, SqlString sqlString)
      bei NHibernate.AdoNet.AbstractBatcher.ExpandQueryParameters(IDbCommand cmd, SqlString sqlString)
      bei NHibernate.Loader.Loader.PrepareQueryCommand(QueryParameters queryParameters, Boolean scroll, ISessionImplementor session)
      bei NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
      bei NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
      bei NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                antineutrino SB
              • Votes:
                6 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Who's Looking?