Menu

Mail extension - question about emai replica

2023-05-01
2023-07-19
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-05-01

    While debugging an issue, I stumbled upon this. There's no functional downside I suppose, but it was a bit weird. I was trying to find out how it was possible the value of EmailReplica's "ticket ID" was 0 (rather than null).

    But apparently: null is allowed, yet 0 is the default? What is the logic behind this (if any, perhaps it's behavior which changed over time)?

            MetaModel::Init_AddAttribute(new AttributeInteger("ticket_id", array("allowed_values" => null, "sql" => "ticket_id", "default_value" => 0, "is_null_allowed" => true, "depends_on" => array())));
    
     
  • Pierre Goiffon

    Pierre Goiffon - 2023-07-19

    Hello Jeffrey,
    There is no clear definition of the null value for external fields in the orm. 0 Means null, but sometimes null can also be assigned.... It's a bit of a mess in the DB but the ORM handles it nevertheless.

     
    👍
    1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.