Tagged Questions
0
votes
1answer
37 views
Building JPA query with “and” and same column names
I have an entity Offers and I need to build named query on combination of two field.
Fields pr_id and of_id.
So the actual query would look like
Select pr_id, of_id, a, b from Offers
where ( ...
0
votes
0answers
10 views
OpenJPA Indirect Relation Entity Query
I'm trying to do a query that basically would do this with OpenJPA:
SELECT *
FROM T_CURRENT c
INNER JOIN T_CURRENCY AS cr ON (c.currencyid = cr.currencyid)
INNER JOIN T_FEE_CURRENT AS f ON ...
0
votes
0answers
17 views
Determination of the reasons of omission of request
There is a procedure reading from a database of value and writing data in ArrayLists which also register in files. As a result of program execution debug files are empty. Prompt in what business. As I ...
-1
votes
1answer
36 views
check specific data already exists using java [closed]
Friends, I need help in query for check whether specific data already exists in table using java. If it exists, I will make insert statements to add in data.
Thanks in advance.
0
votes
1answer
41 views
Writing LIKE equivalent queries in Spring mongoTemplates.. or what should I use?
I am using spring and the MongoTemplate and trying to write an equivalent query SQL LIKE statement.. I am have not seen a satisfactory answer, code below:
@Document
public class Lake {
@Id
private ...
0
votes
0answers
28 views
criteria query fails group by because of single qoutes?
I came accross an interesting behaviour: probably criteria API puts single quotes around parameters in query.
CriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();
CriteriaQuery<SomeClass> ...
0
votes
1answer
27 views
dynamic criteria query multiple selection
I want to write a totally dynamic query method, which gets dinamically column names as parameters. Column names i.e : id, age, name, etc. I'm going to use criteria query, however I don't know how it's ...
0
votes
1answer
26 views
MongoDB Query for pagination from Java Driver
Is the following Query the correct way to perform pagination in MongoDB from Java Driver end ?
Criteria criteria = new Criteria("users").in(userID);
Query query = new ...
-3
votes
0answers
54 views
HQL Query is throwing StringIndexOutOfBoundsException exception [closed]
String hqlQuery = "select catalogueEntry from CatalogueEntry catalogueEntry " +
"left join fetch catalogueEntry.loanList loans " +
"where :loan in elements(loans)";
Query query ...
0
votes
2answers
70 views
how to correct this query?
I have a query that make a inner join 2 tables with this col :
words table : wid, wname, wsyn, wlevel
wordchoice table :wid, ch1, ch2, ch3
but when I want to use this query in bellow , in log ...
0
votes
1answer
45 views
Mongodb: finding lowest element in embedded array
I have a collection students look like this:
{
"_id" : 10,
"name" : "Christiano Ronaldo",
"scores" : [
{
"type" : "exam",
"score" : ...
0
votes
1answer
37 views
Java Criteria API Like condition
Good day guys!. I need to build a dynamic query (with optional filtering parameters and conditions) in Java. I decided to go for the Criteria API since it seemed the most flexible approach.
An ...
0
votes
3answers
65 views
Select single row for column value
Here is sample table data which is dynamic.
ColId Name JobId Instance
1 aaaaaaaaa 1 2dc757b
2 bbbbbbbbb 1 2dc757b
3 aaaaaaaaa 1 010dbb8
4 ...
0
votes
2answers
47 views
How to run several select queries with same statement and result set? [duplicate]
I am trying to write simple Java web application to get data from a database.
I need to run several select queries on different database tables.
String queryOne = "select firstname from employees ...
1
vote
2answers
58 views
Pro and Cons of opening multiple InputStream?
While coding the solution to the problem of downloading a huge dynamic zip with low RAM impact, an idea started besieging me, and led to this question, asked for pure curiosity / hunger of knowledge:
...