mapper.options() is sucky

Issue #55 resolved
Mike Bayer repo owner created an issue

tried an example like this:

mapper.options(eagerload('foo'), eagerload('bar'), eagerload('foo.bar'), eagerload('bar.lala'), ...)

it didnt seem to work, and even if it did Im not completely sure that its not creating properties and then throwing them away, etc. dig into this and see how its really working, look into smarter ways (like checking each properties parent mapper before deciding to copy it)

Comments (5)

  1. Mike Bayer reporter
    • marked as

    this was improved a bunch of changesets ago when the "mapper singleton" behavior was removed for the more lightweight way it is now. still should go thorugh and see if it really works and that its not making lots of excess objects (or maybe it is and who cares). so bumping priority down.

  2. Former user Account Deleted

    (original author: Justin) could the syntax be

    mapper.options(eagerload(['foo','bar','foo.bar','bar.lala']('foo','bar','foo.bar','bar.lala')))
    
  3. Mike Bayer reporter

    yes, the MapperOption would have to detect the list and spawn out a list of EagerLazyOption objects, and use those.

  4. Mike Bayer reporter

    this bug is sort of dead for now. reopen if theres any reported issues with options(), its been working fine.

  5. Log in to comment