contract entity:
from api.extensions import db
from sqlalchemy.sql import expression
contracts_users = db.Table("contracts_users",
db.Column("contract_id"
, db.Integer, db.ForeignKey(
"contracts.id"), primary_key=True),
return {"message": "Contract id couldn't be found"}, 404
pass
On Thursday, May 28, 2020 at 6:07:05 PM UTC+1, Tanjil Hussain wrote:
>
> Could you please give me an example. sorry im abit confused and new to
> this..
>
> On Thursday, May 28, 2020 at 6:02:52 P
Could you please give me an example. sorry im abit confused and new to
this..
On Thursday, May 28, 2020 at 6:02:52 PM UTC+1, Tanjil Hussain wrote:
>
> Hey, what do you mean by this exactly.. sorry im abit confused and new to
> this..
>
> On Thursday, May 28, 2020 at 5:55:08 PM
Hey, what do you mean by this exactly.. sorry im abit confused and new to
this..
On Thursday, May 28, 2020 at 5:55:08 PM UTC+1, Jonathan Vanasco wrote:
>
> Sorry, I meant the SqlAlchemy schema. I can't attempt to troubleshoot
> code that I can't see.
>
--
SQLAlchemy -
The Python SQL Toolkit
permission_contract:
[image: Capture.PNG]
permissions:
[image: Capture2.PNG]
contracts:
[image: Capture3.PNG]
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and
ave to filter:
>
>
> some_object =
> session.query(PermissionEntity).filter(PermissionEntity.permission_id==2,
> PermissionEntity.contract_id==2).first()
>
>
> or
>
> some_object = session.query(PermissionEntity).filter_by(permission_id==2,
> contract_id==2).fi
[image: Capture.PNG]
permission_id and contract_id have a relationship in the database
How can i using remove a entry for example.. if permission_id = 2 and
contract_id = 2 exists in the same entry as shown on line one in database,
i want to be able to remove it from my database. (This entry