Query with parameters doesn't work in 5.2.3 Studio

38 views
Skip to first unread message

Andrej Krivulčík

unread,
Oct 5, 2021, 7:04:29 AM10/5/21
to RavenDB - an awesome database

With sample data, the following query fails with the error below. Reproducible on 5.2.3 and the 5.2.4-nightly-20211002-0301 (currently deployed on http://live-test.ravendb.net/ ).

from index 'Product/Search'
where Name = $p0
{"p0":"Chai"}

System.FormatException: Could not convert Sparrow.Json.LazyStringValue ('{"p0":"Chai"}') to Sparrow.Json.BlittableJsonReaderObject ---> System.InvalidCastException: Invalid cast from 'System.String' to 'Sparrow.Json.BlittableJsonReaderObject'. at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider) at System.String.System.IConvertible.ToType(Type type, IFormatProvider provider) at Sparrow.Json.BlittableJsonReaderObject.ConvertType[T](Object result, T& obj) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Sparrow\Json\BlittableJsonReaderObject.cs:line 523 --- End of inner exception stack trace --- at Sparrow.Json.BlittableJsonReaderObject.ThrowFormatException(Object value, String fromType, String toType, Exception e) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Sparrow\Json\BlittableJsonReaderObject.cs:line 321 at Sparrow.Json.BlittableJsonReaderObject.ConvertType[T](Object result, T& obj) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Sparrow\Json\BlittableJsonReaderObject.cs:line 523 at Sparrow.Json.BlittableJsonReaderObject.TryGet[T](StringSegment name, T& obj) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Sparrow\Json\BlittableJsonReaderObject.cs:line 311 at lambda_method745(Closure , BlittableJsonReaderObject ) at Raven.Server.Documents.Queries.IndexQueryServerSide.Create(HttpContext httpContext, BlittableJsonReaderObject json, QueryMetadataCache cache, RequestTimeTracker tracker, Boolean addSpatialProperties, DocumentDatabase database, QueryType queryType) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Raven.Server\Documents\Queries\IndexQueryServerSide.cs:line 149 at Raven.Server.Documents.Handlers.QueriesHandler.GetIndexQuery(JsonOperationContext context, HttpMethod method, RequestTimeTracker tracker) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Raven.Server\Documents\Handlers\QueriesHandler.cs:line 206 at Raven.Server.Documents.Handlers.QueriesHandler.Query(QueryOperationContext queryContext, OperationCancelToken token, RequestTimeTracker tracker, HttpMethod method, Boolean diagnostics) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Raven.Server\Documents\Handlers\QueriesHandler.cs:line 172 at Raven.Server.Documents.Handlers.QueriesHandler.HandleQuery(HttpMethod httpMethod) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Raven.Server\Documents\Handlers\QueriesHandler.cs:line 88 at Raven.Server.Routing.RequestRouter.HandlePath(RequestHandlerContext reqCtx) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Raven.Server\Routing\RequestRouter.cs:line 356 at Raven.Server.RavenServerStartup.RequestHandler(HttpContext context) in C:\Builds\RavenDB-5.2-Nightly\20211002-0300\src\Raven.Server\RavenServerStartup.cs:line 239

Igal Merhavia

unread,
Oct 5, 2021, 8:30:54 AM10/5/21
to rav...@googlegroups.com
Hi,

Thank you for your report.
I have opened an issue to check that - https://issues.hibernatingrhinos.com/issue/RavenDB-17278

Best regards,
Igal

--
You received this message because you are subscribed to the Google Groups "RavenDB - an awesome database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/c0617b7b-91cf-4649-98e8-ee54cebe3634n%40googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Oct 7, 2021, 7:43:17 AM10/7/21
to ravendb
A regression, yes. The issue has been fixed: https://issues.hibernatingrhinos.com/issue/RavenDB-17278

On Tue, Oct 5, 2021 at 2:04 PM Andrej Krivulčík <kriv...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "RavenDB - an awesome database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/c0617b7b-91cf-4649-98e8-ee54cebe3634n%40googlegroups.com.


--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net
  

Andrej Krivulčík

unread,
Oct 7, 2021, 8:07:16 AM10/7/21
to RavenDB - an awesome database
That's great to know, thanks.
Reply all
Reply to author
Forward
0 new messages