Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.
This repository was archived by the owner on May 25, 2026. It is now read-only.

Related objects support #10

Description

@makridenko
class Author(BaseSBModel):
    pass

class Book(BaseSBModel):
    author: Author = fields.ForeignKey()


author = Author()
book = Book(user=user).save()
book = Book.objects.create(user=user)

# Should work like this
Book.objects.filter(author=author)
Book.objects.filter(author_id=author.id)

book = Book.objects.get(book_id=book.id)

# Get author object (lazy loadings)
book.author
# Get author id
book.author_id 

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions