core-bundle icon indicating copy to clipboard operation
core-bundle copied to clipboard

a filter for publish workflow on queries

Open dbu opened this issue 10 years ago • 9 comments

fix #126

you have to call the filter manually as there is no event or filter system like with the ORM.

for now it only works with the ODM query builder. not with phpcr query builder or sql2. we don't have a DQL, right?

something is wrong with the publishStartDate query but i did not find out what. i reduced it to this but still did not work:

SELECT * 
FROM [nt:unstructured] AS a 
WHERE (
    a.publishStartDate <= CAST('2015-08-25T20:23:44.000+02:00' AS DATE) 
   AND (a.[phpcr:class] = 'Symfony\Cmf\Bundle\CoreBundle\Tests\Resources\Document\Publishable' 
         OR a.[phpcr:classparents] = 'Symfony\Cmf\Bundle\CoreBundle\Tests\Resources\Document\Publishable'
    )
)

i checked the sqlite database and for the /published document, the property is

<sv:property sv:name="publishStartDate" sv:type="Date" sv:multi-valued="0">
    <sv:value length="29">2015-08-23T22:00:00.000+00:00</sv:value>
</sv:property>

dbu avatar Aug 25 '15 20:08 dbu

@dantleech any idea about the date query?

dbu avatar Aug 25 '15 20:08 dbu

ping @dantleech do you have an idea about the date query issue i am seeing?

dbu avatar Sep 20 '15 11:09 dbu

ping @dantleech

dbu avatar Jan 09 '16 13:01 dbu

oops, sorry. That query is generated by jackalope right?

Running a similar query I get an exception when I use the <= operator on both Jackalope and Jackrabbit.

dantleech avatar Jan 09 '16 14:01 dantleech

okay, found it again: https://github.com/jackalope/jackalope-doctrine-dbal/issues/267 says this is not supported with doctrine dbal. we only test this bundle with dbal, so we can't functionally test the feature.

not sure how hard fixing the CAST part of https://github.com/jackalope/jackalope-doctrine-dbal/issues/267 would be, but this is blocked by that.

dbu avatar Jan 11 '16 14:01 dbu

Any chances to get this one closed?

ElectricMaxxx avatar Feb 13 '16 20:02 ElectricMaxxx

@ElectricMaxxx if somebody can either find a query that works or implement the missing bits in jackalope to make this query work. i don't have time to work on this at the moment...

dbu avatar Feb 17 '16 08:02 dbu

I don't that this is a blocker for the release, right?

So we can skip that - i think.

Am 17.02.2016 um 09:20 schrieb David Buchmann:

@ElectricMaxxx https://github.com/ElectricMaxxx if somebody can either find a query that works or implement the missing bits in jackalope to make this query work. i don't have time to work on this at the moment...

— Reply to this email directly or view it on GitHub https://github.com/symfony-cmf/CoreBundle/pull/177#issuecomment-185090990.

ElectricMaxxx avatar Feb 17 '16 08:02 ElectricMaxxx

yep, i removed the milestone a while ago, its a new feature that would have been nice, but not a blocker.

dbu avatar Feb 17 '16 08:02 dbu