Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query contains no columns when it has no records #100

Closed
andybellenie opened this issue Oct 17, 2012 · 10 comments
Closed

Query contains no columns when it has no records #100

andybellenie opened this issue Oct 17, 2012 · 10 comments
Assignees
Labels

Comments

@andybellenie
Copy link
Contributor

Getting an empty query (no columns) when both a) using pagination (page=1) and the query returns no rows.

@rip747
Copy link
Contributor

rip747 commented Oct 17, 2012

was this working before or is it something that i messed up when trying to get the oracle support working?

would you be able to write a test for this? I can then do a bisect and see which commit is the culprit that is causing the regression.

@ghost ghost assigned rip747 Dec 13, 2012
@rip747
Copy link
Contributor

rip747 commented Dec 13, 2012

what database was this on?

@andybellenie
Copy link
Contributor Author

SQL Server.

I've added a test for it here: andybellenie@76710fb

@rip747
Copy link
Contributor

rip747 commented Dec 13, 2012

You are the man!
On Dec 13, 2012 8:47 AM, "Andy Bellenie" notifications@github.com wrote:

SQL Server.

I've added a test for it here: andybellenie@76710fbhttps://github.com/andybellenie/cfwheels/commit/76710fba179d2508c0150ac94b66b2cdd78db89c


Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-11334824.

@rip747
Copy link
Contributor

rip747 commented May 26, 2013

looking into this, I don't see this as a bug. When performing a paginated search, the first query passed to the database is just a count seeing if there are any records. If there are no records, then there is no reason to perform the extra work to perform the second query which actually queries the database for the records.

@rip747 rip747 closed this as completed May 26, 2013
@andybellenie
Copy link
Contributor Author

The second query contains the column list, which is often used to drive functionality. It also means that the result of the query depends on whether or not you enable pagination.

@andybellenie andybellenie reopened this May 29, 2013
@rip747
Copy link
Contributor

rip747 commented May 29, 2013

to me this seems like a non-issue and logic in the findall method is a complete mess. But if you're willing to give it a shot, you have my blessing :)

@ghost ghost assigned andybellenie May 29, 2013
@andybellenie
Copy link
Contributor Author

I thought you'd say that :)

@rip747
Copy link
Contributor

rip747 commented May 29, 2013

hehehe... yes I am evil 😈, but you know I'll be doing some research on this as well. I'll update the ticket with my findings.

@perdjurner
Copy link
Contributor

Correct me if I am wrong but this was not an issue on 1.1.8, right?

Closing.

@perdjurner perdjurner modified the milestones: 1.3.0, 1.2.0 Jul 16, 2014
gitbook-com bot pushed a commit that referenced this issue May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants