Skip to content

mysql version doesn't (yet) support sql syntax #102

@srepmub

Description

@srepmub

the following works fine:

/handelsproduct/13099/?include=voorschrijfproduct

and also this (one-to-many):

/handelsproduct/13099/relationships/componenten/

but strangely, the following does not (many-to-one):

/handelsproduct/13099/relationships/voorschrijfproduct

even though this is sort of the same as the include above..?

with the following error:

sqlalchemy.exc.NotSupportedError: (pymysql.err.NotSupportedError) (1235, "This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'")
[SQL: SELECT voorschrijfproduct.id, voorschrijfproduct.naam, voorschrijfproduct.emballagetype, voorschrijfproduct.hulpmiddel_aard, voorschrijfproduct.hulpmiddel_hoeveelheid, voorschrijfproduct.meervoudig_product, voorschrijfproduct.reden_hulpstof_id, voorschrijfproduct.extra_kenmerk_voorschrijven, voorschrijfproduct.grootte_algemeen, voorschrijfproduct.opvoer_datum, voorschrijfproduct.mutatie_datum, voorschrijfproduct.verval_datum, voorschrijfproduct.generiekproduct_id 
FROM voorschrijfproduct 
WHERE voorschrijfproduct.id IN (SELECT voorschrijfproduct.id 
FROM handelsproduct INNER JOIN voorschrijfproduct ON voorschrijfproduct.id = handelsproduct.voorschrijfproduct_id 
WHERE handelsproduct.id = %s 
 LIMIT %s, %s)]
[parameters: (13099, 0, 1)]
(Background on this error at: https://sqlalche.me/e/20/tw8g)

I don't think mysql 8.0 is that old..? :S

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions