Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:46
    mvorisek labeled #318
  • 13:45
    mvorisek synchronize #301
  • 13:45

    mvorisek on phpstan_l6

    fix always true if (compare)

  • 13:36
    mvorisek synchronize #318
  • 13:36

    mvorisek on phpstan_l6

    improve hook data types DEBUG phpstan type (compare)

  • 13:35
    mvorisek labeled #301
  • 13:35
    mvorisek labeled #871
  • 13:35
    mvorisek labeled #871
  • 13:35
    mvorisek edited #871
  • 13:34
    mvorisek synchronize #871
  • 13:34

    mvorisek on phpstan_l6

    fix cs (compare)

  • 13:30
    mvorisek edited #871
  • 13:29
    mvorisek labeled #871
  • 13:28
    mvorisek synchronize #871
  • 13:28

    mvorisek on phpstan_l6

    Upgrade phpstan to level 6 (compare)

  • 13:28
    mvorisek synchronize #871
  • 13:28

    mvorisek on phpstan_l6

    c u u (compare)

  • 13:24
    mvorisek synchronize #318
  • 13:24

    mvorisek on phpstan_l6

    better hook data types (compare)

  • 13:16
    mvorisek synchronize #318
Romans Malinovskis
@romaninsh
and the worst one is
->enum(['N', 'Y']) vs enum([0, 1])
what you're looking at is "valueList"
that can be stored in ui/valueList
because "Juridiska Persona" will not be used by AD
it's only presentation decorator
Imants Horsts
@DarkSide666
well ... maybe
then I'll haveto define it like this in my model?
->enum(['legal', 'individual'])
->valueList([
    'legal' => 'Juridiska persona',
    'individual' => 'Fiziska persona',
])
or
->enum(['legal', 'individual'])
->ui[
    'valueList' => [
        'legal' => 'Juridiska persona',
        'individual' => 'Fiziska persona',
    ],
])
Romans Malinovskis
@romaninsh
well, yeah kinda.
$v = ['legal' => 'Juridiska persona',
        'individual' => 'Fiziska persona'];
->enum(array_keys($v))->ui(['valueList' => $v]);
Imants Horsts
@DarkSide666
ok
ok, another small PR for you: atk4/data#169
there was problem with fields if they have trailing spaces. tests failed then and we didn't notice that ;)
looks ok.
Imants Horsts
@DarkSide666
atk4/data#169 ready for merge
DarkSide666 @DarkSide666 going offline till later
Romans Malinovskis
@romaninsh
cool.
Imants Horsts
@DarkSide666
small PR ready for merge: atk4/data#170 fixes #166 and add test casefor that
Imants Horsts
@DarkSide666
In Toolkit Field class we have method getExpr() whichnicely returns model field name with all table aliases. Do we have something like that in AD?
It could be useful to have for example in this situation:
  // join address
  $j = $this->join('address');
  $a1 = $j->hasOne('city_id', ['City', 'mandatory' => 'true'])->withTitle();
  $a2 = $j->addField('street');
  $a3 = $j->addField('house');
  $a4 = $j->addField('flat');

  // $this->addExpression('full_address')
  //     ->set('concat_ws('.$a2->getExpr().','.$a3->getExpr().','.$a4->getExpr().','.$a1->getExpr().')');
see commented addExpression - how can I do this in AD to have correct table aliases in field names?
Romans Malinovskis
@romaninsh
I'll be closing down this room in favor of http://gitter.im/atk4/atk4 soon.
invited all participants from here to a new room.
(or rather old one)
Gabriel Balint
@za-dof
Hello, I have a question, I have a model "Game" with a reference ( $this->hasOne('winner_id', "Player"); ) but when I put a simple crud in place, it displays the ID, instead of the name
Romans Malinovskis
@romaninsh
Hey Gabriel. We hang out in atk4/atk4 room. This is atk4/data. I’ll reply you there.
Sylvain Robez-Masson
@syrm
Can we alias primary key like field (field use actual parameter) ?
my primary key is cit_id i want use the name id