mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-27 22:46:04 +00:00
ORM: Skip foreign if for share
This commit is contained in:
@@ -157,6 +157,23 @@ class PostgresqlQueryComposerTest extends TestCase
|
||||
$this->assertEquals($expectedSql, $sql);
|
||||
}
|
||||
|
||||
public function testSelectForShare()
|
||||
{
|
||||
$query = SelectBuilder::create()
|
||||
->from('Comment')
|
||||
->select(['name', 'postId', 'postName'])
|
||||
->forShare()
|
||||
->build();
|
||||
|
||||
$sql = $this->queryComposer->composeSelect($query);
|
||||
|
||||
$expectedSql =
|
||||
'SELECT "comment"."name" AS "name", "comment"."post_id" AS "postId" ' .
|
||||
'FROM "comment" WHERE "comment"."deleted" = false FOR SHARE';
|
||||
|
||||
$this->assertEquals($expectedSql, $sql);
|
||||
}
|
||||
|
||||
public function testDelete1(): void
|
||||
{
|
||||
$query = DeleteBuilder::create()
|
||||
|
||||
Reference in New Issue
Block a user