After updating my version of iTop 1.0.2 to 1.2.1, I tried to add a CI I called "BDD". I created the class which extends from Server and the code is the same as the last one (I mean I coded the BDD class in 1.2.1 the same way as before in 1.0.2) but I have an error while refreshing the Data Model via the Data Model Toolkit.
I get this error :
An error occured while processing the PHP files of the data model:
Declaration of BDD: attempting to redeclare the inherited attribute 'application_list', originaly declared in Server
That class used to work in 1.0.2 and I added that piece of code in the end of the model file (as in the 1.0.2 version) :
new OQLMenuNode('BDD', 'SELECT BDD', $oShortcutsNode->GetIndex(), 1 /* fRank */);
Because the "type" attribute in BDD is not the same as the one in Server, that is one of the advantage of inheritance : you can redeclare it if it's different.
Hello,
After updating my version of iTop 1.0.2 to 1.2.1, I tried to add a CI I called "BDD". I created the class which extends from Server and the code is the same as the last one (I mean I coded the BDD class in 1.2.1 the same way as before in 1.0.2) but I have an error while refreshing the Data Model via the Data Model Toolkit.
I get this error :
That class used to work in 1.0.2 and I added that piece of code in the end of the model file (as in the 1.0.2 version) :
By the way, here is the code :
Can someone help me please ? Thanks in advance.
Thibault.
if BDD extends Server, it will have the Server's attributes. You have already set this attribute in Server, why bother declaring it in BDD?
Because the "type" attribute in BDD is not the same as the one in Server, that is one of the advantage of inheritance : you can redeclare it if it's different.
Type in Server :
Type in BDD :
By the way the default value above is wrong but it doesn't matter. That piece of code used to work in previous versions of iTop.
Anyway, my coworker fixed the problem my commenting an exception in a file which isn't in previous versions.
Thanks you anyway.
Thibault