[PonyORM-list] Automatic intermediate tables for all optional relationships

Alexander Kozlovsky alexander.kozlovsky at gmail.com
Tue Feb 23 12:34:54 UTC 2016

Hi Erik,

You are right, currently Pony uses intermediate tables for Many-to-Many
relationships only. In principle it is possible to implement intermediate
tables support for other types of relationships.
As a downside, intermediate table requires additional JOIN, so its
performance will be worse then the current implementation of One-to-One and
One-to-Many relationships.

Could you describe your use case in a bit more detail? Why do you think
avoiding nullable attributes is a useful goal beside just a theoretical

On Tue, Feb 23, 2016 at 12:45 PM, Erik Quaeghebeur <
ponyorm at equaeghe.nospammail.net> wrote:

> Hi list,
> As I understand it, PonyORM uses an intermediate table for Set-Set
> (Many-to-Many) relationships and nullable attributes for Optional-Set and
> Optional-Optional relationships.
> Is this correct?
> If yes, as a feature request, would it be possible to implement an option
> that also uses an intermediate table for Optional-Set and Optional-Optional
> relationships? This would allow satisfying normalization requirements
> (i.e., avoiding nullable attributes).
> Currently, this can be ‘faked’ using the Set-Set relationship, but then
> uniqueness of relationships (Optional sides) will not be enforced.
> Best regards,
> Erik
> _______________________________________________
> ponyorm-list mailing list
> ponyorm-list at ponyorm.com
> /ponyorm-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20160223/de368eaa/attachment.html>

More information about the ponyorm-list mailing list