[icinga-checkins] icinga.org: icinga-web/jmosshammer/apiIntegration: * Changed transitive property names from absolute to relative, added Host relations

git at icinga.org git at icinga.org
Wed Nov 10 17:47:56 CET 2010


Module: icinga-web
Branch: jmosshammer/apiIntegration
Commit: 1020df157c283da36ccf4949aab18668b6653241
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=1020df157c283da36ccf4949aab18668b6653241

Author: jmosshammer <jmosshammer at mojadev-VGN-NW11S-S.(none)>
Date:   Wed Nov 10 17:47:20 2010 +0100

* Changed transitive property names from absolute to relative, added Host relations

---

 .../database/models/generated/BaseIcingaHosts.php  |   76 ++++++++++++++++++--
 .../models/generated/BaseIcingaServices.php        |   36 +++++-----
 2 files changed, 89 insertions(+), 23 deletions(-)

diff --git a/app/modules/Api/lib/database/models/generated/BaseIcingaHosts.php b/app/modules/Api/lib/database/models/generated/BaseIcingaHosts.php
index 10ab8c9..4a61d04 100644
--- a/app/modules/Api/lib/database/models/generated/BaseIcingaHosts.php
+++ b/app/modules/Api/lib/database/models/generated/BaseIcingaHosts.php
@@ -650,15 +650,81 @@ abstract class BaseIcingaHosts extends Doctrine_Record
     public function setUp()
     {
         parent::setUp();
-        $this->hasMany("IcingaServices as HostServices",array(
+        $this->hasMany("IcingaServices as services",array(
 	    'local' => 'host_object_id',
-	    'foreign' => 'host_object_id',
-	    'owningSide' => 'true'
+	    'foreign' => 'host_object_id'
 	));
-
-	$this->hasOne("IcingaInstances as HostInstance", array(
+	$this->hasOne("IcingaInstances as instance", array(
 	    'local' => 'instance_id',
 	    'foreign' => 'instance_id'
 	));
+	$this->hasMany("IcingaComments as comments", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+        $this->hasMany("IcingaCommenthistory as commenthistory", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasOne("IcingaHoststatus as status", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'host_object_id'
+	));
+	$this->hasMany("IcingaHostchecks as cecks", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'host_object_id'
+	));
+	$this->hasMany("IcingaContacts as contacts", array(
+	    'local' => 'host_id',
+	    'foreign' => 'contact_object_id',
+	    'refclass' => 'IcingaHostContacts'
+	));
+	$this->hasMany("IcingaContactgroups as contactgroups", array(
+	    'local' => 'host_id',
+	    'foreign' => 'contactgroup_object_id',
+	    'refclass' => 'IcingaHostContactgroups'
+	));
+	$this->hasMany("IcingaStatehistory as history", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaServiceEscalations as escalations", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'host_object_id'
+	));
+	$this->hasMany("IcingaTimedevents as timedevents", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaScheduleddowntime as scheduledDowntimes", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaDowntimehistory as downtimeHistory", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaCustomVariables as customVariables", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaService as dependencies", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'dependent_service_object_id',
+	    'refClass' => 'IcingaHostdependencies'
+	));
+	$this->hasMany("IcingaServicegroups as groups", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'hostgroup_object_id',
+	    'refClass' => 'IcingaHostgroupMembers'
+	));
+	$this->hasMany("IcingaNotifications as notification", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
+	$this->hasMany("IcingaAcknowledgements as acknowledgements", array(
+	    'local' => 'host_object_id',
+	    'foreign' => 'object_id'
+	));
     }
 }
\ No newline at end of file
diff --git a/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php b/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php
index b949871..fce07ec 100644
--- a/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php
+++ b/app/modules/Api/lib/database/models/generated/BaseIcingaServices.php
@@ -588,79 +588,79 @@ abstract class BaseIcingaServices extends Doctrine_Record
     {
         parent::setUp();
 
-	$this->hasOne("IcingaHosts as ServiceHost",array(
+	$this->hasOne("IcingaHosts as host",array(
 	    'local' => 'host_object_id',
 	    'foreign' => 'host_object_id'
 	));
-	$this->hasOne("IcingaInstances as ServiceInstance", array(
+	$this->hasOne("IcingaInstances as instance", array(
 	    'local' => 'instance_id',
 	    'foreign' => 'instance_id'
 	));
-	$this->hasMany("IcingaComments as ServiceComments", array(
+	$this->hasMany("IcingaComments as comments", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-        $this->hasMany("IcingaCommenthistory as ServiceCommenthistory", array(
+        $this->hasMany("IcingaCommenthistory as commenthistory", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-	$this->hasOne("IcingaServicestatus as ServiceStatus", array(
+	$this->hasOne("IcingaServicestatus as status", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'service_object_id'
 	));
-	$this->hasMany("IcingaServicechecks as ServiceChecks", array(
+	$this->hasMany("IcingaServicechecks as checks", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'service_object_id'
 	));
-	$this->hasMany("IcingaContacts as Contacts", array(
+	$this->hasMany("IcingaContacts as contacts", array(
 	    'local' => 'service_id',
 	    'foreign' => 'contact_object_id',
 	    'refclass' => 'IcingaServiceContacts'
 	));
-	$this->hasMany("IcingaContactgroups as Contacts", array(
+	$this->hasMany("IcingaContactgroups as contactgroups", array(
 	    'local' => 'service_id',
 	    'foreign' => 'contactgroup_object_id',
 	    'refclass' => 'IcingaServiceContactgroups'
 	));
-	$this->hasMany("IcingaStatehistory as ServiceHistory", array(
+	$this->hasMany("IcingaStatehistory as history", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-	$this->hasMany("IcingaServiceEscalations as ServiceEscalations", array(
+	$this->hasMany("IcingaServiceEscalations as escalations", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'service_object_id'
 	));
-	$this->hasMany("IcingaTimedevents as ServiceEvents", array(
+	$this->hasMany("IcingaTimedevents as events", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-	$this->hasMany("IcingaScheduleddowntime as ServicesScheduledDowntimes", array(
+	$this->hasMany("IcingaScheduleddowntime as scheduledDowntimes", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-	$this->hasMany("IcingaDowntimehistory as ServicesDowntimeHistory", array(
+	$this->hasMany("IcingaDowntimehistory as downtimeHistory", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-	$this->hasMany("IcingaCustomVariables as ServiceCustomVariables", array(
+	$this->hasMany("IcingaCustomVariables as customVariables", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-	$this->hasMany("IcingaService as ServiceDependencies", array(
+	$this->hasMany("IcingaService as dependencies", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'dependent_service_object_id',
 	    'refClass' => 'IcingaServicedependencies'
 	));
-	$this->hasMany("IcingaServicegroups as ServiceGroups", array(
+	$this->hasMany("IcingaServicegroups as groups", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'servicegroup_object_id',
 	    'refClass' => 'IcingaServicegroupMembers'
 	));
-	$this->hasMany("IcingaNotifications as ServiceNotification", array(
+	$this->hasMany("IcingaNotifications as notification", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));
-	$this->hasMany("IcingaAcknowledgements as ServiceAcknowledgements", array(
+	$this->hasMany("IcingaAcknowledgements as acknowledgements", array(
 	    'local' => 'service_object_id',
 	    'foreign' => 'object_id'
 	));





More information about the icinga-checkins mailing list