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

allow typname to be a list #22

Closed
chadwhitacre opened this issue Oct 5, 2013 · 1 comment
Closed

allow typname to be a list #22

chadwhitacre opened this issue Oct 5, 2013 · 1 comment

Comments

@chadwhitacre
Copy link
Collaborator

I have a model that I'd like to register for multiple types. The usecase is making a type that basically inherits from another type (though afaict Postgres doesn't implement type inheritance yet), overriding a foreign key field to actually subselect the record from the other table. By registering a single composite for multiple such types I could determine at query time whether I'd end up with the subselect or not.

@chadwhitacre
Copy link
Collaborator Author

Here's where this arose: gratipay/gratipay.com@1ec5522

chadwhitacre added a commit that referenced this issue Oct 5, 2013
This addresses the underlying concern on #22, though in a different way
than is suggested there. The common case is registering for a single
type, and that is what MyModel.typname is intended for. If you want to
get fancy then use register_composite with a typname kwarg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant