You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This part in the "ORM documentation is not implemented properly in the "package",
class Post(Model):
@belongs_to('source_id', 'id')
def source(self):
from app.models.Source import Source
return Source
this code is working properly. But when i remove the parameters as said in the documetation it's exchanging the order of the paramters and giving the error below:
class Post(Model):
@belongs_to
def source(self):
from app.models.Source import Source
return Source
no such column: sources.source_id
Basically when I add the relationship with parameters. its working well: @belongs_to('source_id', 'id')
but when I remove the parameters as in the documentation: @belongs_to
it gives this error: no such column: sources.source_id
so as in the error it's supposed to be: "posts.source_id" not "sources.source_id"
Desktop (please complete the following information):
OS: [Mac OSX]
Version [Monterery 12.2]
What database are you using?
Type: [SQLite]
Masonite ORM [2.0]
The text was updated successfully, but these errors were encountered:
Describe the bug
It will be assumed here that the primary key of the relationship here between users and companies is id -> {method_name}_id. You can change the relating columns if that is not the case:
This part in the "ORM documentation is not implemented properly in the "package",
this code is working properly. But when i remove the parameters as said in the documetation it's exchanging the order of the paramters and giving the error below:
no such column: sources.source_id
Basically when I add the relationship with parameters. its working well:
@belongs_to('source_id', 'id')
but when I remove the parameters as in the documentation:
@belongs_to
it gives this error:
no such column: sources.source_id
so as in the error it's supposed to be: "posts.source_id" not "sources.source_id"
Desktop (please complete the following information):
What database are you using?
The text was updated successfully, but these errors were encountered: