Questions tagged [fetch]

DO NOT USE. For questions about the JavaScript Fetch API, use the [fetch-api] tag instead. For the git subcommand, use [git-fetch]. This tag is ambiguous.

fetch is used in many contexts, include source control, database querying, and cache control.

References

11193 questions
296
votes
6 answers

What is the difference between JOIN and JOIN FETCH when using JPA and Hibernate

Please help me understand where to use a regular JOIN and where a JOIN FETCH. For example, if we have these two queries FROM Employee emp JOIN emp.department dep and FROM Employee emp JOIN FETCH emp.department dep Is there any difference between…
abbas
  • 6,453
  • 2
  • 40
  • 36
121
votes
6 answers

query specified join fetching, but the owner of the fetched association was not present in the select list

I'm selecting two id columns but get error specified: org.hibernate.QueryException: **query specified join fetching, but the owner of the fetched association was not present in the select list** [FromElement{explicit,not a collection join,fetch…
Vyacheslav
  • 3,134
  • 8
  • 28
  • 42
84
votes
7 answers

PDO::fetchAll vs. PDO::fetch in a loop

Just a quick question. Is there any performance difference between using PDO::fetchAll() and PDO::fetch() in a loop (for large result sets)? I'm fetching into objects of a user-defined class, if that makes any difference. My initial uneducated…
Lotus Notes
  • 6,302
  • 7
  • 32
  • 47
79
votes
9 answers

redirect after a fetch post call

I am creating an social login page with an Access Management (AM) server. When user click on the login button then I make a fetch http post call to AM server. AM server generates a HTTP 301 redirect response with auth cookies to the social login…
zappee
  • 20,148
  • 14
  • 73
  • 129
74
votes
1 answer

Next.js: Reduce data fetching and share data between pages

I'm looking for solutions for better data fetching in a Next.js app. In this question I'm not just looking for a solution, I'm looking for multiple options so we can look at the pros and cons. The problem I have Right now I have a few pages that all…
eivindml
  • 2,197
  • 7
  • 36
  • 68
74
votes
1 answer

Fetch vs FetchMany in NHibernate Linq provider

NHibernate eager loading can be done using Fetch and FetchMany, as described in NHibernate Linq Eager Fetching on Mike Hadlow's blog. What is the difference between these two methods and under what circumstance would each be used?
Simon
  • 1,499
  • 3
  • 17
  • 23
65
votes
2 answers

Using Axios GET with Authorization Header in React-Native App

I'm trying to use axios for a GET request with an API which requires an Authorization header. My current code: const AuthStr = 'Bearer ' + USER_TOKEN; where USER_TOKEN is the access token needed. This string concatenation may be the issue as if I…
Ally Haire
  • 2,398
  • 1
  • 14
  • 19
62
votes
7 answers

GET with query string with Fetch in React Native

I am making a request like this: fetch("https://api.parse.com/1/users", { method: "GET", headers: headers, body: body }) How do I pass query string parameters? Do I simply add them to the URL? I couldn't find an example in the docs.
Guy
  • 12,488
  • 16
  • 79
  • 119
59
votes
6 answers

Spring Data JPA And NamedEntityGraphs

currently I am wrestling with being able to fetch only the data I need. The findAll() method needs to fetch data dependant on where its getting called. I do not want to end up writing different methods for each entity graph. Also, I would avoid…
dendimiiii
  • 1,659
  • 3
  • 15
  • 26
54
votes
3 answers

django-orm case-insensitive order by

I know, I can run a case insensitive search from DJango ORM.…
simplyharsh
  • 35,488
  • 12
  • 65
  • 73
53
votes
14 answers

php pdo: get the columns name of a table

How can I get all the column names from a table using PDO? id name age 1 Alan 35 2 Alex 52 3 Amy 15 The info that I want to get are, id name age EDIT: Here is my…
Run
  • 54,938
  • 169
  • 450
  • 748
51
votes
5 answers

Getting error after I put Async function in useEffect

In the useEffect function, if I just mention the getResults function variable, the app doesn't crash. But when I call it as I am doing in code below, I get these errors: react-dom.development.js:21857 Uncaught TypeError: destroy is not…
Irakli Tchigladze
  • 693
  • 2
  • 7
  • 13
49
votes
6 answers

Hibernate fetching strategy - when to use "join" and when to use "select"?

Most Hibernate associations support "fetch" parameter: fetch="join|select" with "select" being default value. How to decide which one to use for which association? I tried changing all from "select" to "join" application wide - number of generated…
serg
  • 109,619
  • 77
  • 317
  • 330
48
votes
4 answers

Trying to get property of non-object in

on Control page: on View Page:
Gereltod
  • 2,043
  • 8
  • 25
  • 39
46
votes
3 answers

Core Data: Query objectIDs in a predicate?

I am fetching a set of objects from a Core Data persistent store using a fetch request and a predicate. My current predicate simply checks whether an attribute is >= a certain value. This all works great, except that I want to finally exclude any…
Michael Waterfall
  • 20,497
  • 27
  • 111
  • 168
1
2 3
99 100