Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer implementation for subtypes #417

Closed
romaninsh opened this issue May 9, 2019 · 1 comment
Closed

Nicer implementation for subtypes #417

romaninsh opened this issue May 9, 2019 · 1 comment

Comments

@romaninsh
Copy link
Member

Currently to implement sub-types you would need to create "afterLoad" hook and break that with a manual type-to-class mapping. That's way too much work.

The proposal is to implement a new type of field for that:

        $this->addField('type', ['SubTypeSwitch', 'cast'=>[
            'expression' => Model\Data\Field\Expression::class,
            'lookup' => Model\Data\Field\Lookup::class,
            'link' => Model\Data\Field\Link::class,
            'aggregate' => Model\Data\Field\Aggregate::class,
        ]);
@mvorisek
Copy link
Member

closing in favor of DBAL types, PR #727

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants