Sorry I was doing something real stupid Thanks ----- Original Message ----- From: "Prasad Iyer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 24, 2003 6:14 PM Subject: Re: [Hibernate] Error "expecting 'elements' or 'indices'"
> very Thanks. > Still one more question. I tried that query but I am still finding trouble. > The query is something like this > "from MultiplePersonalisedResponse multiple where > multiple.singlePersonalisedResponse[0].creationDate=:startDate and > multiple.userid=:userid" > > The error it gave me is something like this. > net.sf.hibernate.QueryException: unindexed collection before []: > multiple.singlePersonalisedResponse [from > com.webify.eligibility.BenefitResponse.MultiplePersonalisedResponse multiple > where multiple.singlePersonalisedResponse[0].creationDate=:startDate and > multiple.userid=:userid] > > The error it gave me is something like this > I am not able to figure it out thanks. > regards > prasad chandrasekaran > > ----- Original Message ----- > From: "Gavin King" <[EMAIL PROTECTED]> > To: "Prasad Iyer" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, September 24, 2003 5:34 PM > Subject: Re: [Hibernate] Error "expecting 'elements' or 'indices'" > > > > > > Please see the Hibernate documentation for information about how to > > query collections. Also > > note that you cannot use the [] syntax after a parameter name. > > > > Prasad Iyer wrote: > > > > >Hi, > > >I am trying to execute a query on the two tables which has one-to-many > > >relationship between them > > >I get this error. I don't understand this error I tried everything using > > >ArrayList and Array. But don't get it right can anyone help. Please > > >MultiplePersonalisedResponse has a list that contains the collection of > > >singlePersonalisedResponse and I want to get the data for > > >singlePersonalisedResponse between two days. > > > > > >net.sf.hibernate.QueryException: expecting 'elements' or 'indices' after: > > >multiple.singlePersonalisedResponse.creationDate [from > > >com.webify.eligibility.BenefitResponse.MultiplePersonalisedResponse > multiple > > >where multiple.singlePersonalisedResponse.creationDate=:startDate[0] and > > >multiple.userid=:userid] > > > > > >at > > > >net.sf.hibernate.hql.PathExpressionParser.doCollectionProperty(PathExpressi > o > > >nParser.java:469) > > > > > >at > > > >net.sf.hibernate.hql.PathExpressionParser.token(PathExpressionParser.java:1 > 7 > > >2) > > > > > >at > net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:362) > > > > > >at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:391) > > > > > >at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:277) > > > > > >at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73) > > > > > >at > > > >net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120 > ) > > > > > >at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29) > > > > > >at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132) > > > > > >at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:119) > > > > > >at > > > >net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:3 > 5 > > >8) > > > > > >at > > > >net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:3 > 3 > > >6) > > > > > >at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1354) > > > > > >at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1318) > > > > > >at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:68) > > > > > >at > > > >com.webify.eligibility.BenefitResponse.MultiplePersonalisedResponseHelper.g > e > > > >tMultiplePersonalisedResponseFor3Days(MultiplePersonalisedResponseHelper.ja > v > > >a:185) > > > > > >at > > > >com.webify.eligibility.db.HibernateTest.getMultiple3Days(HibernateTest.java > : > > >107) > > > > > >at com.webify.eligibility.db.HibernateTest.main(HibernateTest.java:850) > > > > > >java.lang.NullPointerException > > > > > >at > > > >com.webify.eligibility.db.HibernateTest.getMultiple3Days(HibernateTest.java > : > > >108) > > > > > >at com.webify.eligibility.db.HibernateTest.main(HibernateTest.java:850) > > > > > >Thanks in advance > > >regards > > >prasad chandrasekaran > > > > > > > > > > > >------------------------------------------------------- > > >This sf.net email is sponsored by:ThinkGeek > > >Welcome to geek heaven. > > >http://thinkgeek.com/sf > > >_______________________________________________ > > >hibernate-devel mailing list > > >[EMAIL PROTECTED] > > >https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel