Skip to content

Commit

Permalink
Fix SQL read statements in fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
ilijastuden committed Apr 24, 2022
1 parent 49042ad commit 07aa380
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/src/Fixtures/SpatialEntity/Base/SpatialEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ abstract class SpatialEntity extends Entity
* Table fields prepared for SELECT SQL query.
*/
protected array $sql_read_statements = [
'`id`',
'`name`',
'ST_GEOMFROMTEXT(`polygon`) AS \'polygon\'',
'`spatial_entities`.`id`',
'`spatial_entities`.`name`',
'ST_GEOMFROMTEXT(`spatial_entities`.`polygon`) AS \'polygon\'',
];

/**
Expand Down
7 changes: 6 additions & 1 deletion test/src/Fixtures/StatSnapshots/Base/StatsSnapshot.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ abstract class StatsSnapshot extends Entity
/**
* Table fields prepared for SELECT SQL query.
*/
protected array $sql_read_statements = ['`id`', '`account_id`', '`day`', '`stats`'];
protected array $sql_read_statements = [
'`stats_snapshots`.`id`',
'`stats_snapshots`.`account_id`',
'`stats_snapshots`.`day`',
'`stats_snapshots`.`stats`',
];

/**
* Generated fields that are loaded, but not managed by the entity.
Expand Down
10 changes: 9 additions & 1 deletion test/src/Fixtures/Users/Base/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ abstract class User extends Entity
/**
* Table fields prepared for SELECT SQL query.
*/
protected array $sql_read_statements = ['`id`', '`type`', '`first_name`', '`last_name`', '`email`', '`homepage_url`', '`password`'];
protected array $sql_read_statements = [
'`users`.`id`',
'`users`.`type`',
'`users`.`first_name`',
'`users`.`last_name`',
'`users`.`email`',
'`users`.`homepage_url`',
'`users`.`password`',
];

/**
* List of default field values.
Expand Down
8 changes: 7 additions & 1 deletion test/src/Fixtures/Writers/BaseWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ abstract class BaseWriter extends Entity implements EntityInterface
/**
* Table fields prepared for SELECT SQL query.
*/
protected array $sql_read_statements = ['`id`', '`name`', '`birthday`', '`created_at`', '`updated_at`'];
protected array $sql_read_statements = [
'`writers`.`id`',
'`writers`.`name`',
'`writers`.`birthday`',
'`writers`.`created_at`',
'`writers`.`updated_at`',
];

/**
* List of default field values.
Expand Down

0 comments on commit 07aa380

Please sign in to comment.