Menu

Updating database fails after changing class's parent class

eric24V
2025-08-01
2025-08-04
  • eric24V

    eric24V - 2025-08-01

    Hello,

    I tried to change the parent class of licence like this:

    <class id="Licence" _delta="must_exist">
      <parent _delta="redefine">Contract</parent>
      <fields _delta="redefine">
        ...
      </fields>
    </class>
    

    The installation fails at step "Updating database schema" at 40 % with the following error:

    Fatal error: Uncaught Error: Class "Licence" not found in /var/www/html/mytestitop/env-production/itop-config-mgmt/model.itop-config-mgmt.php:2165

    The datamodel-production.xml looks valid to me. If I take the definition of class Licence from datamodel-production.xml and put in in my extension with _delta="redefine" to redefine the class completely, the error is the same.

    Thanks for any help.

     
  • Vincent @ Combodo

    Hi,
    It's a very old identified iTop limitation, it is not possible to change the parent class of a class. Whatever method you use, you ends up in trouble.
    You need to create a new class under contract mirroring the Licence class attributes...
    Regards

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.