Announcement

Collapse
No announcement yet.

Is it safe to treat entity IDs as hexadecimal numbers ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it safe to treat entity IDs as hexadecimal numbers ?

    And most importantly... while it seems to be the case for my example test below, are they guaranteed to be sequential everywhere?

    PHP Code:
    hexdec('5bdc8e46653e355b1') = 1.059091517652E+20
     hexdec
    ('5bdc95aa8c0b1223e') = 1.0590928179287E+20 is MORE than previous line.
     
    hexdec('5bdd78d29c3027bbd') = 1.0591327797221E+20 is MORE than previous line.
     
    hexdec('5bdd7cffd629d49c5') = 1.059133514489E+20 is MORE than previous line.
     
    hexdec('5bdd7d3edff4b010f') = 1.0591335578085E+20 is MORE than previous line

    Also, is it possible to use where clause on the id like this?
    PHP Code:
      $results $manager->getrepository('Lead')->where(['id>='=>'5a1c4b6a6c66a5fa9'])->find(); 
    Last edited by tothewine; 11-10-2019, 11:46 PM.
Working...
X