Open mixmastamyk opened 6 years ago
Hey, I seem to be having this issue too, though just for version 0.17
. I downgraded to 0.16
as a solution. A patch to the library also seemed to fix the issue, though I didn't check if the regression was solved in 1.0.0b1
.
As far as the patch, I added a line in the method primary_key_names
in helpers.py
(as shown below, highlighted line). The method appears to be updated in the repo however, so odds are the issue has been corrected in future versions.
I'm using '1.0.0b1' btw.
Since the issue was not implemented in any stable tag (nor in beta), my proposed workaround is to set the attribute called "property" on the hybrid_property, as follows and as mentioned in the stack overflow answer :
`
@hybrid_property
def key_id(self):
return int(self.key.split('-')[1])
@key_id.expression
def key_id(cls):
return cast(func.split_part(cls.key, '-', 2), Integer)
key_id.__setattr__("property", "None")
`
Hi, there is a fork project Flask-Restless-NG that has this issue and some other issues fixed, along with performance improvements
Hi, do you have any insight on this error I'm getting with SQLAlchemy and flask-restless? It is crashing with a 500 server error when I try to access /players which references a player group:
Here are my models, so far:
Thanks,