OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Invalid PathExpression. Must be a StateFieldPathExpression

This topic contains 1 reply, has 2 voices, and was last updated by Andrey Yatsenko Andrey Yatsenko 1 year, 6 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #37651

    Hello, I’m trying to query using entityManager and connect to entity OrderAddress, and i got this error:

    [Semantical Error] line 0, col 27 near ‘country ‘: Error: Invalid
    PathExpression. Must be a StateFieldPathExpression.

    Here is how i did:

    I’ve notice that this entity doesn’t define country, its extends from an abstract called AbstractAddress.

    I’ve also try to extends the OrderAddress entity and define the country, but it say the country already exists. So i can’t do it.
    Here is how i extends:

    Please give advice in this situation. Thanks, have a nice week.

Viewing 1 replies (of 1 total)
  • Author
  • #37659
    Andrey Yatsenko
    Andrey Yatsenko

    Please check the base theory of how entity extends functionality works at ORO. You should never extend entities directly with php extends, instead, please use migrations.

    The country field is already there. the issue probably in the query itself, not in the database structure.

    Firts issue I see, parameters should not be passed to query directly, please use placeholders and setParameter method instead, like:

Viewing 1 replies (of 1 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No