Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] setcontent #116
Some basic features
This is the first of the
So we have
A distinction is to be made when query-ing:
Pagination and Search are not implemented yet.
3 times, most recently
Nov 30, 2018
Why do we use DQL for selects? This can be done with:
Doing it this way would ease integration with API Platform.
Eventually this Read Model can, but not must, be stored in separate faster Storage, like Redis, ElasticSearch or even MongoDB.
Also, good to read:
This is primarily a branch by @xiaohutai to get a baseline, ported version of
Improvements and fixes should go into the accompanying epic and/or subsequent issues. :-)
@JarJak I'll have to read up on that.
I've tried getting this up and running with the code that was available as a starting point (this may not have been the best idea). I think the most important part is that the results returned is consistent. So if a refactor/re-write is better, then we should definintely go for that.
(Any help is, of course, appreciated)
@xiaohutai the key thing here is that rewriting this feature to DQL and then back to SQL is a double work. DQL is super slow for complex queries (like listing things with joins) and should be avoided unless you don't really need an Entity object. You need Entity only when you are going to change and persist it. So, DQL is fine in admin area, but doing a couple of complex setcontent (DQL) calls inside a frontend twig template or api call can kill performance easily.
If we really need full entities in frontend, how about using Criteria instead of DQL?
@JarJak Thanks for the resources. I'm don't have much Doctrine experience, so I need to read up on that. Both Doctrine ORM and the Query code from Bolt 3 is quite new for me (it's the non-legacy setcontent version).
Also: I've added a skip rule for
To be honest I think that I am not not qualified for this. Doctrine ORM and the Query layer are both rather new to me. With the rest of the changes open and still features not working, I am not sure how to solve those properly.
Hopefully someone else with more experience can work on it and/or refactor it. I believe that's why Bob asked me to make a start with it. @bobdenotter, you'll have the final say.
Thank you @JarJak for all the feedback. Appreciated!