Hi
Is it possible to use the queryDSL in frontend? E.g.
I have 4 filters in the frontend. I want to create for each filter a
standard query. Only the column names and the values will be
replaced with the user input. Then i will pass the query to the
backend, put the entityManager into it and execute the query. Is this
possible? If not can you add a feature like this?
Currently I only found this:
HQLQuery query = new JPAQuery (entityManager);
...
Is it possible to set the entityManger later?
Best regards
Daniel Görlich
--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
So you wouldn't do it typesafe, because the performance is bad?
Can you please give me a link to an example with the dynamic model, thx.
Daniel
--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Timo,
thanks for the example and your time :)
But I think it's the same code isn't it? Here I also have to check if the value is null or empty. If it is null or empty i don't want to add it to the query. So where is the difference? I have to pass the propertyName and tableName in both ways.
In my case I have a "filter template". I create a NamedBean (JSF class) which have the properties for a filter (e.g. it's a periodFilter). So my NamedBean have the properties dateFrom, dateTo. Also my NamedBean has a method which creates automatically the where clause e.g. where propertyName > dateFrom and propertyName < dateTo (if one of the property is null don't add it -> where propertyName > dateFrom). This is one method which includes this functionality and creates the where-statement.
Now i can use this filter template for each view where I have to filter a column which includes a date. And I only have to pass the propertyName (property which should be filtered) and the query where the statement should be added.
I don't understand why I need more code if i use the typsafeQuery instead the other one.
Another question: Can you also use the PathBuilder for classes which are not entitites e.g. classes which are created at runtime?
Daniel
--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Yes I agree, but in my case I will only have "typed representation" of a query. In some cases I can add the parameter if it is null in some not and so on.. I have to implement it once and that's it (these are old filter templates which haven't be changed the last years, I only have to implement it with a newer technology). So it doesn't matter if I use typsafe queries or not, right?
Which way would you prefer to create statements for "dynamic classes"? Is there also a possibility to do it with queryDSL?
Thanks for your support :)
Daniel
--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.