Could not fetch Products NAN
https://source.azeero.at/Joniras/azeero.group/-/edit/dev/server/src/API/Modules/Shop/Product/Routes/GetProductsPage.ts
Stelle
if (typeof group === "number" übersieht
https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Operators/typeof
typeof NaN === 'number'
ich verstehe aber den zusammenhang nicht wieso dort NaN stehen kann.
nown column 'NaN' in 'where clause'","route":"/products/:page/:itemsPerPage"}
{"time":"2020-6-22 9:24:50","errorCode":"SEQUELIZE_ERROR","message":"Could not fetch Products SequelizeDatabaseError: Unknown column 'NaN' in 'where clause'","route":"/products/:page/:itemsPerPage"}
JOIN products AS main_products on correct_stock.fproduct_seq_id = main_products.seq_id
JOIN collective_distribution cd on correct_stock.fcoll_dist_seq_id = cd.seq_id
LEFT JOIN coll_dist_product cdp on (correct_stock.fproduct_seq_id = cdp.fproduct_seq_id AND correct_stock.fcoll_dist_seq_id = cdp.fcoll_dist_seq_id)
LEFT JOIN units on units.seq_id = main_products.unit
LEFT JOIN translation t on t.seq_id = units.ftranslation_seq_id
JOIN translation_lang tl on tl.ftranslation_seq_id = t.seq_id
LEFT JOIN language l on l.seq_id = tl.flang_seq_id
LEFT JOIN (select COUNT(*) as count, p.variationOf as id from products p left join coll_dist_product cdp on cdp.fproduct_seq_id = p.seq_id where IFNULL(cdp.is_requestable_kz,'Y') = 'Y' group by p.variationOf) varCount on varCount.id = main_products.seq_id
LEFT JOIN events e ON main_products.fevent_seq_id = e.seq_id
LEFT JOIN (SELECT concat(DATE_FORMAT(e.event_date_start, '%d.%m.%Y'),'') as collection, e.seq_id as seq_id from events e) stock on stock.seq_id = e.seq_id
LEFT JOIN chat3d c3d ON main_products.fevent_seq_id = c3d.fevent_seq_id
LEFT JOIN product_category pc on pc.fproduct_seq_id = main_products.seq_id
LEFT JOIN category categ on pc.fcategory_seq_id = categ.seq_id
LEFT JOIN collective_distribution subCD on subCD.seq_id = cd.fcd_main_seq_id
LEFT JOIN (select pg.seq_id as seq_id, pg.public as public from category c inner join persongroup pg ON c.seq_id = pg.fgroup_category_seq_id) fgroup on fgroup.seq_id = cd.fpersongroup_seq_id
LEFT JOIN company_plant cp ON cd.fcompany_plant_seq_id = cp.seq_id
LEFT JOIN company_plant cpp ON main_products.fcompany_plant_seq_id = cpp.seq_id
LEFT JOIN
(SELECT
MAX(pg.social_price) price_factor,
COUNT(*) found_group,
cdg.fcoll_dist_seq_id
FROM
person_group pg, person p, collective_distribution_group cdg
WHERE
pg.fperson_seq_id = p.seq_id
AND p.seq_id = NULL
AND cdg.fcategory_seq_id = pg.fcategory_seq_id
GROUP BY cdg.fcoll_dist_seq_id) social ON (cd.seq_id = social.fcoll_dist_seq_id)
WHERE
main_products.name LIKE '%%'
AND correct_stock.is_requestable_kz = "Y"
AND main_products.variationOf IS NULL
AND l.short = 'de-DE'
and cd.seq_id in (
SELECT cdg.fcoll_dist_seq_id
FROM collective_distribution_group cdg, persongroup pg
WHERE cdg.fcategory_seq_id = pg.fgroup_category_seq_id
AND pg.content = 'O' and pg.seq_id = NaN
) ORDER BY main_products.name ASC