Skip to content

Commit

Permalink
Fix not working update for HolidayPool
Browse files Browse the repository at this point in the history
  • Loading branch information
Volmarg committed Jul 16, 2020
1 parent fd0efdf commit f894b57
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Entity/Modules/Job/MyJobHolidaysPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class MyJobHolidaysPool implements EntityInterface{

const FIELD_DAYS_IN_POOL = "daysInPool";
const FIELD_DAYS_IN_POOL = "days_in_pool";

/**
* @ORM\Id()
Expand All @@ -26,9 +26,9 @@ class MyJobHolidaysPool implements EntityInterface{
private $year;

/**
* @ORM\Column(type="string", length=255)
* @ORM\Column(type="string", length=255, name="days_in_pool")
*/
private $days_in_pool;
private $daysInPool;

/**
* @ORM\Column(type="string", length=255)
Expand Down Expand Up @@ -60,11 +60,11 @@ public function setYear(string $year): self {
}

public function getDaysInPool(): ?string {
return $this->days_in_pool;
return $this->daysInPool;
}

public function setDaysInPool(string $days_in_pool): self {
$this->days_in_pool = $days_in_pool;
$this->daysInPool = $days_in_pool;

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Modules/Job/MyJobHolidaysPoolType.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) {
],
'label' => $this->app->translator->translate('forms.MyJobHolidaysPoolType.labels.year')
])
->add('daysInPool', IntegerType::class, [
->add(MyJobHolidaysPool::FIELD_DAYS_IN_POOL, IntegerType::class, [
'attr' => [
'min' => 1,
'placeholder' => $this->app->translator->translate('forms.MyJobHolidaysPoolType.placeholders.daysInPool')
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Modules/Job/MyJobHolidaysPoolRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function getDaysInPoolForYear(string $year): int
$connection = $this->_em->getConnection();

$sql = "
SELECT hp.days_in_pool as daysInPool
SELECT hp.days_in_pool as days_in_pool
FROM my_job_holiday_pool hp
WHERE 1
Expand Down

0 comments on commit f894b57

Please sign in to comment.