I have a class Question
inherited from fActiveRecord
.
When I try to run the following code:
$question = new Question();
$question->setQuestion($_question)->setUseruid($useruid)->setOriginuid($originuid)->setStatus(0)->setAnonymous($anonymous)->store();
the system throws an exception (I am sharing only the message, not the stack trace):
Answer: Please enter a value
Now, I have tried to give a value to that answer field, as follows:
$question = new Question();
$question->setQuestion($_question)->setUseruid($useruid)->setOriginuid($originuid)->setStatus(0)->setAnonymous($anonymous)->store();
but I have no luck, I get the same error.
answer is a not null
longtext
field in the mysql database table questions
. It is able to hold the '' value, but it seems impossible to store empty string as the value of a not-null
field using flourishlib. Is this a bug or am I missing something? Is there a work-around?