Comments (3)
Hi, Sergey. Please describe what results do you expect.
from doctrine-extensions.
If examine native query
SELECT
c0_.id AS id_0,
c1_.id AS id_1,
r2_. CODE AS code_2,
GROUP_CONCAT(r3_.number) serial_all,
GROUP_CONCAT(CASE WHEN r3_.cartItemId > 0 THEN r3_.number END) serial_selected,
r2_.sku AS sku_6,
r2_. NAME AS name_7,
c0_.quantity AS quantity_8,
c0_.price AS price_9,
r3_.*
FROM
cart_item c0_
LEFT JOIN cart c1_ ON c0_.cartId = c1_.id
LEFT JOIN ra_spare_city r5_ ON (c0_.itemId = r5_.id)
LEFT JOIN ra_spare r2_ ON r5_.productId = r2_.id
LEFT JOIN ra_spare_serial r3_ ON r2_.id = r3_.productId AND (c0_.id = r3_.cartItemId OR r3_.cartItemId IS NULL)
WHERE
c0_.cartId = 1777
GROUP BY r2_.id
this query in GROUP_CONCAT
should give me only cartItem which bind in serial
table otherwise nothig to do. At screencast you can see serial_selected which has only one value and serial_all which include all avaliable values.
from doctrine-extensions.
Hi, @popovsergiy
Seems that this issue is duplicate of #19
Checked it with next query
SELECT
GROUP_CONCAT(CASE WHEN f.budget > 0 THEN f.budget ELSE 0 END)
FROM Oro\\Entities\\Foo f GROUP BY f.code
Which works fine with latest release https://github.com/orocrm/doctrine-extensions/releases/tag/1.0.12
Please, check that you are using correct one
Improved test coverage for this case
https://github.com/orocrm/doctrine-extensions/pull/26/files
from doctrine-extensions.
Related Issues (20)
- GROUP_CONCAT With string and not identifier HOT 5
- doctrine-extensions installation error HOT 5
- FROM_UNIXTIME SQL method HOT 1
- WEEK with mode selector HOT 1
- FLOOR support HOT 1
- problem with TIMESTAMPDIFF postgresql implementation HOT 2
- master version is not unstallable from komposer HOT 1
- Support DATE_FORMAT HOT 2
- [Feature Request] SQLite Support HOT 5
- Composer require doesn't load Round.php HOT 2
- Link from readme 404 HOT 1
- Thoughts about support of package HOT 6
- Not working with Doctrine ORM 2.8
- Enable tests on PHP >=7.3
- 2.x progress
- New tag in packagist HOT 1
- Error when using DATE_FORMAT HOT 3
- Update to PHP 8 HOT 5
- Doctrine deprecations HOT 2
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-extensions.