Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:21
    mvorisek review_requested #877
  • 00:21
    mvorisek review_requested #877
  • 00:21
    mvorisek review_requested #319
  • 00:21
    mvorisek review_requested #319
  • 00:21
    mvorisek ready_for_review #319
  • 00:21
    mvorisek ready_for_review #877
  • May 11 22:21
    mvorisek opened #877
  • May 11 22:21
    mvorisek opened #319
  • May 11 22:19

    mvorisek on minor_fixes

    Bump versions for the next rele… (compare)

  • May 11 22:19

    mvorisek on minor_fixes

    Bump versions for the next rele… (compare)

  • May 11 22:18

    mvorisek on minor_fixes

    Bump versions for upcoming v3.1 (compare)

  • May 11 20:18
    mvorisek edited #246
  • May 11 15:15
    georgehristov edited #306
  • May 11 15:15
    georgehristov edited #306
  • May 11 13:32

    mvorisek on 3.0.gen

    (compare)

  • May 11 13:32

    mvorisek on 3.0.0

    (compare)

  • May 11 13:31

    mvorisek on 3.0.gen

    (compare)

  • May 11 13:30

    mvorisek on 3.0.0

    (compare)

  • May 11 13:28

    github-actions[bot] on 3.0.gen

    Build Release (compare)

  • May 11 13:27

    github-actions[bot] on 3.0.gen

    Build Release (compare)

Imants Horsts
@DarkSide666
maybe we should always always use enum array keys as possible values, but then simple enum(['foo','bar'])will actually save 0 or 1 in db not foo or bar. That's not intuitive, but possible solution
Romans Malinovskis
@romaninsh
isset($enum[0]) - could this work?
which is why i don't want enum() to contain key-value, as it makes certain cases impossible.
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