Quantcast
Channel: OXID Community Forum
Viewing all articles
Browse latest Browse all 6951

model save fails

$
0
0
heys guys, quick question:

PHP Code:

            $oComment oxNew('troportalcommentsmodel');
            
$oComment->troportalcomment__trocommentid = new oxField($soxId);
            
$oComment->troportalcomment__oxuserid = new oxField('oxadmin');
            
$oComment->troportalcomment__message = new oxField($needed['troportalcomment_message']);
            
$oComment->troportalcomment__oxtimestamp = new oxField(date('Y-m-d H:i:s'));
            
$oComment->troportalcomment__oxinsert = new oxField(date('Y-m-d H:i:s'));
            
$oComment->save(); 

for some reason, my model isn't saving values, even though i can read from it.
If i var_dump $oComment before the save()-function, i have all the values I need.

I tried "$oComment->hasErrors()" but it shows me false.
Is there a way to see the query, which is executed?

Viewing all articles
Browse latest Browse all 6951

Trending Articles