sqlmodel icon indicating copy to clipboard operation
sqlmodel copied to clipboard

✨ Add support for hybrid_property

Open van51 opened this issue 2 years ago • 25 comments

Attempt to solve https://github.com/tiangolo/sqlmodel/issues/299 and add support for hybrid_property properties.

van51 avatar Oct 31 '22 11:10 van51

📝 Docs preview for commit 55c9526dac2411f6e14e9c7fce283ab076d3b2ae at: https://635fb362686fae1e8384a5e3--sqlmodel.netlify.app

github-actions[bot] avatar Oct 31 '22 11:10 github-actions[bot]

📝 Docs preview for commit f5a474fbffa3bbbf43fd5b402ffcc08f980e1680 at: https://635fb41dc6090b1e80805996--sqlmodel.netlify.app

github-actions[bot] avatar Oct 31 '22 11:10 github-actions[bot]

The proposed addition was working correctly for sqlalchemy==1.4.23, but on the latest sqlalchemy==1.4.41 is not working anymore. The error is shown on the checks above. I'll try to pinpoint what has changed.

van51 avatar Nov 01 '22 08:11 van51

📝 Docs preview for commit a7ec9ff140085c1965631c000f65e4ad0e303fd8 at: https://6362568c806a400cb061aacd--sqlmodel.netlify.app

github-actions[bot] avatar Nov 02 '22 11:11 github-actions[bot]

Codecov Report

Base: 98.49% // Head: 98.50% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (1359098) compared to base (ea79c47). Patch coverage: 100.00% of modified lines in pull request are covered.

:exclamation: Current head 1359098 differs from pull request most recent head 93509eb. Consider uploading reports for the commit 93509eb to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #482   +/-   ##
=======================================
  Coverage   98.49%   98.50%           
=======================================
  Files         185      186    +1     
  Lines        5856     5890   +34     
=======================================
+ Hits         5768     5802   +34     
  Misses         88       88           
Impacted Files Coverage Δ
tests/conftest.py 100.00% <100.00%> (ø)
tests/test_sqlalchemy_properties.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Nov 02 '22 11:11 codecov[bot]

📝 Docs preview for commit 32b125ce4cec2a42fbac385f1bb9e967474e3396 at: https://6362577741a93d01dcd99ece--sqlmodel.netlify.app

github-actions[bot] avatar Nov 02 '22 11:11 github-actions[bot]

📝 Docs preview for commit 1359098a00f0ae57c5b8166c5f07269602929e89 at: https://636258b54b0bfa040aa9faf9--sqlmodel.netlify.app

github-actions[bot] avatar Nov 02 '22 11:11 github-actions[bot]

📝 Docs preview for commit 93509eb7a5f64e13a8693f9ec951174fa10e5f49 at: https://639ce098ecf1fd03689b400e--sqlmodel.netlify.app

github-actions[bot] avatar Dec 16 '22 21:12 github-actions[bot]

Any plans to solve it?

shepilov-vladislav avatar Dec 29 '22 09:12 shepilov-vladislav

Hi, it has been fixed in the current PR implementation. I had forgotten to add a comment about it.

van51 avatar Jan 11 '23 08:01 van51

@van51 Any plans to merge it? I use your commit pip install git+https://github.com/van51/sqlmodel.git#93509eb and can confirm that it works as expected last 2 months. But I can't understand why it's still not merged to trunk 😅

shepilov-vladislav avatar Feb 10 '23 08:02 shepilov-vladislav

@van51 Any plans to merge it? I use your commit pip install git+https://github.com/van51/sqlmodel.git#93509eb and can confirm that it works as expected last 2 months. But I can't understand why it's still not merged to trunk 😅

Hi @shepilov-vladislav , unfortunately I don't have write access to this repository. We have to ping/mention someone from the maintainers.

I am glad to know that it works for you though :)

van51 avatar Feb 10 '23 08:02 van51

I see 😢 @tiangolo Can you help with this? What can we do to force this?

shepilov-vladislav avatar Feb 10 '23 12:02 shepilov-vladislav

I see 😢 @tiangolo Can you help with this? What can we do to force this?

linpan avatar Feb 21 '23 09:02 linpan

This hybird_property is cool ,it solved my pain,hope to merge

1219295581 avatar Feb 24 '23 15:02 1219295581

works great. hope to merge too.

felimuno avatar Jun 23 '23 19:06 felimuno

Would love to have this

kyhorne avatar Jul 17 '23 02:07 kyhorne

Bumping this as it really should be pulled & merged.

Islati avatar Sep 27 '23 14:09 Islati

@tiangolo after new releases with sqlalchemy 2.0 support, maybe it's time to merge this?

PipeKnight avatar Dec 15 '23 11:12 PipeKnight

Willy Wonka: But Charlie, don’t forget what happened to the man who suddenly got everything he always wanted. Charlie Bucket: What happened? Willy Wonka: He lived happily ever after.

Please sir, merge and release.

lesleslie avatar Dec 30 '23 19:12 lesleslie

Use my PR #801 if you need these features

50Bytes-dev avatar Feb 14 '24 13:02 50Bytes-dev

@tiangolo Any ETA on this? Would be really appreciated 😊

marhoy avatar Feb 26 '24 08:02 marhoy

Good god, nearly 2-years and @tiangolo cant even be bothered to acknowledge this major shortcoming with sqlmodel? And this is even a PR vs just a complaint in an issue? Damn.

I guess this is a prime example of why we are quickly reverting our short-lived idea about migrating our codebade to SQLModel.

zzachattack2 avatar Jul 11 '24 11:07 zzachattack2