Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

findOneOrCreate and ARRAY column #272

Open
Pepino483 opened this Issue · 1 comment

2 participants

@Pepino483

I don't know when this is a bug or not but i thing so..

This my code..

<?php
$productId = 2223;
$array = array(55, 22);

$var = \Product\VariationQuery::create()
            ->filterByProductId($productId)
            ->filterByOptions($array, \Criteria::CONTAINS_ALL)
        ->findOneOrCreate();

Options column is type of ARRAY

When there isn't found record, generating new Variation object but contains only one value from array.. I thing, that should have all values of array and no only first value..

@fzaninotto
Collaborator

That's a limit use case that I'm not sure how Propel should handle. What do you think should happen when using other comparison methods (like Criteria::CONTAINS_SOME and Criteria::CONTAINS_NONE)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.