Questions tagged [autoquery-servicestack]
19 questions
4
votes
1 answer
Using ServiceStack Autoquery With Value Types that don't implement IConvertible
I was trying to use AutoQuery with a NodaTime.LocalDate on a query parameter and I get the following exception when I try to filter using that date field, specifically >MyDate=2020-01-01 (ordering is unaffected):
[MyEndpoint: 5/23/2016 4:19:51 PM]:…

Anthony Carl
- 182
- 6
3
votes
1 answer
Servicestack - OR operator for consuming autoquery rdbms API
Is there a way to use OR operator for conditions in queries. I know that the modifier [QueryDbField(Term=QueryTerm.Or)] can be used but this will change the behavior of the property always. Maybe some times I need to query with AND and some times I…

Fernando Juarez
- 45
- 2
3
votes
1 answer
AutoQuery: join tables via a middle table and define which FK to join on
We started using ServiceStack AutoQuery recently. It's a nice feature and we really enjoyed it. We have a table structure like this (minified version to make it easy to read):
Salary [Id (PK), ManagerId (FK)]
Manager [Id (PK), DepartmentId (FK)] /*…

Jeff
- 13,079
- 23
- 71
- 102
2
votes
1 answer
ServiceStack AutoQuery AutoFilter Like operand
I am trying to implement SQL Like operator using AutoFilter attribute. Tried the below code,
[AutoFilter(field:"Name", Template = "{Field} like {Value}", ValueFormat = "%{0}%")]
and the transformed SQL Expression looks like this (from SQL…

Raajkumar
- 857
- 2
- 13
- 26
2
votes
2 answers
ServiceStack AutoQuery join use
After reading the documentation, I am not sure but I have come to the conclusion that when creating QueryDb, you cannot choose the columns to join by? And I am under the impression, you must have DTO object to copy to? You cannot copy to a regular…

petrosmm
- 528
- 9
- 23
2
votes
1 answer
Servicestack autoquery custom convention doesn't work with PostgreSQL
I have defined new implicit convention
autoQuery.ImplicitConventions.Add("%WithinLastDays", "{Field} > NOW() - INTERVAL '{Value} days'");
The problem is that for postgres connection the query is wrong translated into
WHERE "TABLE"."FIELD" > NOW() -…

marcinn
- 1,879
- 2
- 22
- 46
2
votes
1 answer
ServiceStack AutoQuery into custom DTO
So, I'm working with ServiceStack, and know my way around a bit with it. I've used AutoQuery and find it indispensable when calling for straight 'GET' messages. I'm having an issue though, and I have been looking at this for a couple of hours. I…

StratMN
- 161
- 8
2
votes
1 answer
ServiceStack - Autoquery Request logs issue
I'm struggling to get the example custom autoquery of the requestlogs working in a servicestack service.
I'm using VS2017 and have used the ServiceStack ASP.NET empty template to create a new solution. I then added some of the code from the example…

Steve
- 127
- 1
- 8
2
votes
1 answer
AutoQuery insight needed
So, I'm working with ServiceStack and love what it offers. We've come to a point where I'm needing to implement a queryable data API... prior to my coming to this project, a half backed OData implementation was done. I'd rather not try and weed…

StratMN
- 161
- 8
2
votes
1 answer
ServiceStack AutoQuery and Field Term Or
I am trying to change a few fields on an autoquery to query using or (it is a search box that is searching many fields). This doesn't seem to work although according to the documentation it should.
public class PropertyGet :…

lucuma
- 18,247
- 4
- 66
- 91
2
votes
1 answer
Can you disable count (Total) for ServiceStack AutoQuery?
I have AutoQuery setup against a simple join of two tables with approximately 1.3 million rows. Using the built in mini profiler to measure the SQL timings, the query to return the first 100 rows (no filtering) takes 3ms and the count takes an…

Anthony Carl
- 182
- 6
1
vote
1 answer
Filtering AutoQuery Results to Only Display Table Rows that Match Data in the Users Session
I'm working on a project that want's to control data access in a multi-tenant system. I've got a table set up which has a row on it that says what tenant the object applies to. Let's call this property
ClientObject.ClientOrgId
I want to set…

Patrick
- 13
- 4
1
vote
0 answers
Autoquery servicestack ILeftJoin issue with table.id column
I have definition of autoquery dto defined as below:
[Route("/project/{ProjectId}/contracts/{ContractId}/items")]
public class QueryContractItem : QueryDb,
ILeftJoin

marcinn
- 1,879
- 2
- 22
- 46
1
vote
1 answer
Filtering out soft deletes with AutoQuery
I'm using ServiceStack with OrmLite, and having great success with it so far. I'm looking for a way to filter out 'soft deleted' records when using AutoQuery. I've seen this suggestion to use a SqlExpression, but I'm not sure where you would place…

StratMN
- 161
- 8
1
vote
1 answer
AutoQuery / Ormlite-servicestack: Can I filter out soft deletes on a QueryDb class?
We have a few services built up with Ormlite/Servicestack and we are mostly pulling out database objects and POCOs using QueryData with custom logic.
However, we have one table that really doesn't need to be logically expanded on and works just fine…

joh04667
- 7,159
- 27
- 34