Set NULL values in CF9 ORM

Is there a way to get CF9 ORM to insert NULL Values into the database rather than an empty string?

I've got a numeric field which can be null, but throws an error because it's trying to enter ''.

11
задан James A Mohler 1 December 2012 в 07:14
поделиться

1 ответ

Либо:

yourEntity.setNumber(javacast("null",""));

, либо добавьте метод removeNumber:

function removeNumber()
{
    structDelete(variables,"number");
}
17
ответ дан 3 December 2019 в 07:10
поделиться
Другие вопросы по тегам:

Похожие вопросы: