need a MapperOption that creates a new Mapper with an alias of the table

Issue #16 resolved
Mike Bayer repo owner created an issue

if you want to use the same table twice within two different relations inside a mapper, you have to make an alias of the table. this means you cant relate to an existing mapper in both places, and you have to make a full copy of that mappers properties on the alias.

make a MapperOption so you can say this:

m = MyClass.mapper.options(alias('foo'))

returns a copy of MyClass.mapper against a table alias 'foo'.

Comments (1)

  1. Mike Bayer reporter

    this strategy doesnt work as described in #15. the much more convenient 'selectalias' relation flag has been added instead, so this feature is not needed.

  2. Log in to comment