You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's a schema that has extended data in a different table that varies by a type ID, as in this example:
generic
-------
generic_id PK AUTO_INCREMENT
generic_type_id (indicates which extended table to join to, e.g. extension1, extension2, etc.)
[fields common amongst all extensions]
generic_extension1
------------------
generic_id PK, not AUTO_INCREMENT
[fields specific to the extension]
generic_extension2
------------------
generic_id PK, not AUTO_INCREMENT
[fields specific to the extension]
Then one might except there to be getGeneric_Object() method on the GenericExtension* classes. However, perhaps because this is the primary key, Cough does not look for these relationships.
Current workaround is to provide the methods manually on an as-needed basis:
public function loadGeneric_Object()
{
$this->setGeneric_Object(Generic::constructByKey($this->getKeyId()));
}
public function getGeneric_Object()
{
if (!isset($this->objects['Generic_Object']))
{
$this->loadGeneric_Object();
}
return $this->objects['Generic_Object'];
}
public function setGeneric_Object($generic)
{
$this->objects['Generic_Object'] = $generic;
}
The text was updated successfully, but these errors were encountered:
If there's a schema that has extended data in a different table that varies by a type ID, as in this example:
Then one might except there to be
getGeneric_Object()
method on theGenericExtension*
classes. However, perhaps because this is the primary key, Cough does not look for these relationships.Current workaround is to provide the methods manually on an as-needed basis:
The text was updated successfully, but these errors were encountered: