You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-11-14 00:05:59

maunat
Member
Registered: 2023-11-13
Posts: 1

Foreign Keys - Via Plugin

Hello everyone,

I'm trying to understand how GLPI foreign keys mechanism works. It's pretty clear with native objects but when I try to create a custom object via Object Management plugin and to attach a new block created via Fields plugin even if the column is correctly named (plugin_objectname_id) the foreign key checks and mechanism provided by GLPI are not triggered.

Could it be a good solution to fork the Fields plugin for creating "physical" foreign keys via alter table queries?

Hope someone could help me.

Thank you.

Offline

#2 2023-11-14 15:18:13

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: Foreign Keys - Via Plugin

GLPI does not use actual foreign keys in the database. The relations are all handled by GLPI itself instead. If there is an issue with orphaned data, it is probably a bug or something missing in the plugin(s).

What incorrect behavior are you seeing when you use these plugins together?


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB