|
|
@@ -237,8 +237,6 @@ abstract class Entity {
|
|
|
* Count how many records there is on the database
|
|
|
* in relation with this class with the parameters filter
|
|
|
*
|
|
|
- *
|
|
|
- *
|
|
|
* @param Array $criterias Criteras for WHERE Array('id' => Array('=', 10) )
|
|
|
* @param boolean $trashed Bring trashed registers?
|
|
|
*
|
|
|
@@ -278,7 +276,6 @@ abstract class Entity {
|
|
|
/**
|
|
|
* Find One
|
|
|
*
|
|
|
- *
|
|
|
* @param Array/Int $criterias Array('id' => Array('in', Array(10, 20, 30)))
|
|
|
* @param Array $select Array(id, fullname)
|
|
|
* @param Boolan $trashed true, false
|
|
|
@@ -418,6 +415,8 @@ abstract class Entity {
|
|
|
* This relation will be created on the User class
|
|
|
* making reference to the Phone class
|
|
|
*
|
|
|
+ * @ctag $this->hasOne('foreign_object', 'field_in_remote');
|
|
|
+ *
|
|
|
* @param Object $foreign_object Class instance from the remote object
|
|
|
* @param (int, string) $field_in_remote Field in local object matchin the remote id
|
|
|
*
|
|
|
@@ -440,6 +439,8 @@ abstract class Entity {
|
|
|
* This relation will be created on the Post class
|
|
|
* Making reference to the Comment class
|
|
|
*
|
|
|
+ * @ctag $this->hasMany('foreign_object', 'field_in_foreign');
|
|
|
+ *
|
|
|
* @param type $foreign_object Instance of a remote class
|
|
|
* @param (int, string) $field_in_foreign The field to match the local id
|
|
|
*
|
|
|
@@ -460,6 +461,9 @@ abstract class Entity {
|
|
|
*
|
|
|
* This relation will be created on the comment class
|
|
|
* Making reference to the post class
|
|
|
+ *
|
|
|
+ * @ctag $this->belongsTo('foreign_object', 'local_field');
|
|
|
+ * @ctag $this->belongsTo('foreign_object', 'local_field', 'id');
|
|
|
*
|
|
|
* @param Object $foreign_object Instance of a remote class
|
|
|
* @param (int, String) $local_field Remote field relate to local Object
|
|
|
@@ -482,6 +486,10 @@ abstract class Entity {
|
|
|
*
|
|
|
* This relation will be created in both classes
|
|
|
*
|
|
|
+ * @ctag $this->belongsToMany('foreign_object', 'pivot_table', 'local_in_pivot', 'remote_in_pivot');
|
|
|
+ * @ctag $this->belongsToMany('foreign_object', 'pivot_table', 'local_in_pivot', 'remote_in_pivot', $remote_filter = Array());
|
|
|
+ * @ctag $this->belongsToMany('foreign_object', 'pivot_table', 'local_in_pivot', 'remote_in_pivot', $remote_filter = Array(), $remote_limit = Array());
|
|
|
+ *
|
|
|
* @param Object $foreign_object Instance of the remote class
|
|
|
* @param string $pivot_table Name of the pivot table
|
|
|
* @param int $local_in_pivot Name of field on the pivot in relation of the local class
|
|
|
@@ -520,6 +528,10 @@ abstract class Entity {
|
|
|
* Table Tag = (id, name)
|
|
|
* Table Post_Tag = (id, postid, tagid)
|
|
|
*
|
|
|
+ * @ctag $this->belongsToManyExtended('foreign_object', 'pivot_table', 'local_in_pivot', 'remote_in_pivot');
|
|
|
+ * @ctag $this->belongsToManyExtended('foreign_object', 'pivot_table', 'local_in_pivot', 'remote_in_pivot', $remote_filter = Array());
|
|
|
+ * @ctag $this->belongsToManyExtended('foreign_object', 'pivot_table', 'local_in_pivot', 'remote_in_pivot', $remote_filter = Array(), $pivot_limits = Array());
|
|
|
+ *
|
|
|
* This relation will be created in both classes
|
|
|
*
|
|
|
* @param Object $foreign_object Instance of the remote class
|