Active
Project:
Orm
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Dec 2009 at 21:34 UTC
Updated:
18 Jan 2010 at 23:45 UTC
elegant module. yet, CCK is still incomlete.
I have a videoclip type content with a url CCK field.
the following code failed to update
$newNode = orm('videoclip')->create();
$newNode->setTitle('Show Mon Nov 30 2009 06:14:03 PM');
$newNode->body = 'body of text and other stuff';
$newNode->url = '123';
$newNode->save();
but the following workaround did work:
$newNode = orm('videoclip')->create();
$newNode->setTitle('Show Mon Nov 30 2009 06:14:03 PM');
$newNode->body = 'body of text and other stuff';
$newNode->field_url[0]['value'] = '123';
$newNode->save();
Comments
Comment #1
brendoncrawford commentedLiorm,
As you may notice, I have not added field mappers for the cck fields. What I am currently implementing would be a magic getter/setter, so in your example it would be something like:
$newNode->setUrl('123');
I am having a few problems with trying to implement this correctly, so it may take some time.
Thanks for your feedback