implemented relations dynamically

pull/61/head
Christophe Vandeplas 2011-12-11 13:29:54 +01:00
parent 84ebbea07c
commit c1e5bdb271
2 changed files with 0 additions and 70 deletions

View File

@ -1,37 +0,0 @@
<?php
class RelationsController extends AppController {
var $name = 'Relations';
function index() {
$this->Relations->find('all');
debug($this);
}
// /**
// * Updates the relations table for a specific Signature
// * @param unknown_type $id
// */
// function _updateForSignature($id) {
// // remove all entries in the relations table
// // remove all entries where signature_id
// // remove all entries where event_id
// // search for similar signatures
// // create new entries
// }
function _getRelationsForEvent($id) {
// get relations_id from Relations for event_id
// get event_id[] from Relations for relations_id
// perhaps write a subquery ?
}
}

View File

@ -1,33 +0,0 @@
<?php
class Relation extends AppModel {
var $name = 'Relation';
var $validate = array(
'signature_id' => array(
'notempty' => array(
'rule' => array('notempty'),
),
),
'event_id' => array(
'notempty' => array(
'rule' => array('notempty'),
),
),
'relation_id' => array(
'notempty' => array(
'rule' => array('notempty'),
),
),
);
// We explicitly have no relations
var $belongsTo = array(
);
var $hasMany = array(
);
}