kbond / foundry-next

MIT License
0 stars 1 forks source link

feat: improve repository decorator #7

Closed nikophil closed 9 months ago

nikophil commented 9 months ago

improve RepositoryDecorator based on

RepositoryProxy / RepositoryDecorator

Here is something about RepositoryDecorator I don't know how to mititgate, and which creates hard failures in my code base:

kbond commented 9 months ago

RepositoryDecorator only returns T but RepositoryProxy used to return Proxy.

Yeah, I wanted to simplify this in 2.0 so that you only get a proxy if you use the static PersistentProxyObjectFactory methods.

What about a config option? repository_proxy: true, we throw a deprecation if true forcing users to set to false in 1.x. Then in 2.x, we deprecate this config option entirely.