mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Fix undefined pk (#8260)
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
7545f9501a
commit
b91059a522
@ -10,6 +10,7 @@ module.exports = async ({ ORM, loadedModel, definition, connection, model }) =>
|
||||
if (!definitionDidChange) {
|
||||
return;
|
||||
}
|
||||
|
||||
const draftAndPublishMigrationWay = await getDraftAndPublishMigrationWay({ definition, ORM });
|
||||
if (draftAndPublishMigrationWay === 'disable') {
|
||||
await migrateDraftAndPublish({ definition, ORM, way: 'disable' });
|
||||
|
@ -237,7 +237,7 @@ module.exports = async ({ models, target }, ctx, { selfFinalize = false } = {})
|
||||
|
||||
// Force singular foreign key
|
||||
details.attribute = singular(details.collection);
|
||||
details.column = targetModel.primaryKey;
|
||||
details.column = 'id';
|
||||
|
||||
// Set this info to be able to see if this field is a real database's field.
|
||||
details.isVirtual = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user