Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to self refer to skill? #21

Closed
bbelderbos opened this issue Nov 11, 2022 · 3 comments
Closed

How to self refer to skill? #21

bbelderbos opened this issue Nov 11, 2022 · 3 comments
Assignees

Comments

@bbelderbos
Copy link
Collaborator

We found this, we need to try this ...
fastapi/sqlmodel#127

@cmsato09
Copy link
Owner

cmsato09 commented Nov 11, 2022

Someone has written up a docs page that hasn't been approved yet.
fastapi/sqlmodel@5b4c9e4

preview of the page
https://6311ba9503310f5f48cdd4f0--sqlmodel.netlify.app/advanced/self-referential/

@bbelderbos
Copy link
Collaborator Author

Great find, so something like this right?

     boss_id: Optional[int] = Field(
         foreign_key="villain.id", default=None, nullable=True
     )
     boss: Optional["Villain"] = Relationship(
         back_populates="minions", sa_relationship_kwargs=dict(remote_side="Villain.id")
     )
     minions: List["Villain"] = Relationship(back_populates="boss")

@cmsato09
Copy link
Owner

See pull #22 Self-reference Skill

@cmsato09 cmsato09 reopened this Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants