Comments (15)
Can Paginator handle NativeQuery?
from doctrine.
It does not. Lets look at ResultSet which accepts AbstractQuery in constructor. I think it is just typo in your code. However there can be some easier QueryObject which could implements subset of current methods. Don`t you think?
from doctrine.
The whole point of result set is to paginate the result, and if you pass me a native query, I have no idea ho to count the total number of rows it will return.
from doctrine.
Sadly, I failed as well to use QueryObjects for native queries.
from doctrine.
Well, ok. However there could be at least interface/abstract class which I can extend and then use it in similar way as QueryObject. Current QueryObject can use this class as well. I want to call
$result = $dao->fetch(new AwesomeNativeQuery());
The result can be then an array. The other way is to add another method to EntityDao
(eg. fetchNative
).
from doctrine.
Fuck, bad button.
from doctrine.
This dould be doable, if there would be optional method countNativeQuery
in the query object, that you would have to implement to bypass the total count problem.
from doctrine.
Total count by subselect would not be a problem.
from doctrine.
Are you sure that is a good idea?
from doctrine.
Well, not universally, since sometimes you have 1:N joins. :|
from doctrine.
I agree with @Majkl578 - Doctrine do it itself in Paginator.
from doctrine.
Would you guys give it a try please?
from doctrine.
It shouldn't be closed, right?
from doctrine.
Well, I've tested it and it worked, so why not?
from doctrine.
I thought it is in some pull request at first. I must agree now :-)
from doctrine.
Related Issues (20)
- Wrong DateTime obj HOT 1
- Unable to use custom data types with PDO instance initialization HOT 1
- v3.1.2 => v3.2.0 - Warning Illegal string offset 'metadata' HOT 10
- Compatibility with Nette HOT 4
- Explain queries
- Undefined index: Doctrine\ORM\Event::onClear on 7.1 HOT 3
- Composer instalation failing HOT 2
- It will be support for Nette 3 ? HOT 18
- Problem with doctrine/orm BC breaks HOT 9
- Cannot use 'Object' as class name as it is reserved in PHP 7.2 HOT 1
- PHP 7.2 support HOT 1
- PHP 7.2 compatible release - Help needed!
- Tag v3.3.0 is in wrong branch HOT 1
- support for wrapperClass: Doctrine\DBAL\Connections\MasterSlaveConnection HOT 1
- When calling EntityManager#persist() prior to Connection#connect(), custom dbalTypes are not known
- Is it possible to add 'like' clause in findBy method? HOT 4
- Tag new version
- Incompatible with doctrine/orm 2.7.3
- Incompatible with doctrine/dbal 2.11.0 HOT 1
- Not possible to install with Nette 3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrine.