orator
orator copied to clipboard
I use with_trashed method load softdelete data but it not work.
Hello again .
I would like to include in the record has been deleted users.
class User(SoftDeletes, Model):
__dates__ = ['deleted_at']
class Lotteries(Model):
@belongs_to
def user(self):
return User.with_trashed()
result = Lotteries.with_('user').get()
But I get the SQL statement, still have the condition users.deleted_at IS NULL
It took 6.31ms to execute the query SELECT * FROM `lotterys`
It took 2.17ms to execute the query SELECT * FROM `users` WHERE (`users`.`id` IN (103, 104)) AND (`users`.`deleted_at` IS NULL)
If only query the user it is right.
User.with_trashed().get()
i am doing wrong?
is there any update over this issue?
For other people that may have this issue: You can install this pull request with: pip install git+https://github.com/sdispater/orator.git@refs/pull/350/merge which fixes the problem.