#1367: [enhancement idea] column aggregation inheritance
--------------------------+-------------------------------------------------
Reporter: klemens_u | Owner: romanb
Type: enhancement | Status: reopened
Priority: minor | Milestone: 1.0.0-RC2
Component: Inheritance | Version: 1.0
Resolution: | Keywords:
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 0 |
--------------------------+-------------------------------------------------
Changes (by klemens_u):
* status: closed => reopened
* resolution: worksforme =>
Comment:
Replying to [comment:1 jwage]:
> If you use yaml schema files and you define columns in the children with
column aggregation inheritance it will move the column definitions to the
parent when parsing the schema files before generating the php code.
Yes you're right, the columns are moved. But there is still one problem:
Regarding the example schema above:
The columns from User and Group are moved to Entity[[BR]]
Then User and Group inherit the columns from Entity[[BR]]
Therefore User and Group have all the columns, even User has the Group
columns and vice versa[[BR]]
In my opinion User should only have the columns from Entity and User, and
Group only the columns from Entity[[BR]]
In other words: The invalid User columns for Group should be unset. (and
of course the other way round as well)
Example: the generated BaseGroup class could look like
{{{
abstract class BaseGroup extends Entity
{
public function setTableDefinition()
{
parent::setTableDefinition();
$this->getTable()->removeColumn('username');
$this->getTable()->removeColumn('password');
}
}
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1367#comment:3>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---