Eugene
Eugene
I mean, when you have query result like that, with `group by` `User`: User | Company ------------ | ------------- User_1 | Company_1 User_1 | Company_2 User2 | Company_1 we can...
>We do need better support for SQLAlchemy subqueries, or a wrapper Why not? New users may need this functionality when porting their application on asyncio. >I'll come up with a...
@wwwjfy Sorry, i have read it wrong :) >alias.corresponding_column(User.id) can be replaced by alias.columns.id what happens when there will be several models inside subquery? please take it mind when creating...
Hi @wwwjfy , how is going your research?
@wwwjfy i have found the case your code does not cover - complete model loading from subquery without specifying all columns explicitly
@bunyk try https://marshmallow.readthedocs.io/en/3.0/ for schema validation
@bunyk i think, that will be greate to have PR with this feature @wwwjfy what do you think about it?
@ahopkins let's do something with this pull request to finally merge it into main branch ;) if you have any questions/suggestions i'm ready to resolve them
I have almost same issue, with polymorphic self related hierarchy with many to many relationship: ``` model_poly = with_polymorphic(ModelA, "*", flat=True, aliased=True) File "lib/python3.10/site-packages/sqlalchemy/orm/_orm_constructors.py", line 2395, in with_polymorphic return AliasedInsp._with_polymorphic_factory(...
@CaselIT sorry for misunderstanding, i have updated my post with `ModelB` definition. btw, workaround with aliased class and relationship inside classmethod works: ```python @classmethod def __declare_last__(cls): j = aliased(ModelB) cls.children...