V8-archive: Failed generating the SQL query.

Created on 29 Aug 2019  路  5Comments  路  Source: directus/v8-archive

Bug

artist one-to-many with artworks one-to-many with images

images collection contains file field

  • When updating images file from artist, error occur.

Steps to Reproduce

Everything is in Screenrecording using directus demo

Expected Behavior

message: "Failed generating the SQL query."
query: "INSERT INTO `directus_users` (`id`, `external_id`) VALUES (NULL, '6dd89760-7169-486d-9dab-431827fd384e')"

Actual Behavior

It should save successfully

Technical Details

  • Device: Desktop
  • OS: Win 10 10.0.18362.145
  • Web Server: Apache/2.4.29
  • PHP Version: PHP 7.1.30
  • Database: 10.2.26
  • Install Method: v2.5.0 build
  • Directus App: 7.10.0
duplicate

Most helpful comment

@rijkvanzanten - I think this is the time when we should pass only updated fields as a payload in O2M and M2M.

Here, created_by is also passing along with the file id for updation and that's the cause of this issue.

All 5 comments

@rijkvanzanten - I think this is the time when we should pass only updated fields as a payload in O2M and M2M.

Here, created_by is also passing along with the file id for updation and that's the cause of this issue.

What happened there, I'm pretty sure we fixed the O2M diffing already 馃 Maybe that wasn't released yet?

I'm pretty sure we fixed the O2M diffing already

Maybe. As right now it is passing whole object instead of updated data.

Closing this as we should ass only updated fields as a payload in O2M and M2M which is duplicate of https://github.com/directus/app/issues/2042

Ok they related thanks @bjgajjar

Was this page helpful?
0 / 5 - 0 ratings