jfinkels / flask-restless

NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.
https://flask-restless.readthedocs.io
GNU Affero General Public License v3.0
1.02k stars 301 forks source link

How to query between a field in model and sub model #651

Open anuragagarwal561994 opened 7 years ago

anuragagarwal561994 commented 7 years ago

Let us assume there is a ModelA and ModelB. ModelA has a one to many relationship with ModelB. ModelA has a field called name and ModelB has a field called alias. I want to query for all ModelB where ModelB.alias <> ModelA.name.

Earlier in 0.17 I think this was possible via ModelA__name but in 1.0.0b1 this functionality seems to be uncovered. I tried a lot of approaches but none worked.