You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
You're best of creating your own documentset class and then putting any functions in there you need. Then, the definition in your document looks something like:
output:
"attribute" : [
{
"attributeGuid" : "fixedTag",
"viewOrder" : "0"
},
{
"attributeGuid" : "fixedTitle",
"viewOrder" : "1"
}
],
"description" : "Tag Content",
"guid" : "tag"
question: how to update/delete attributeGuid:fixedTag to attributeGuid:fixedContent ??
i did just:
$profile = Models_Mongo_Profile::one(array('guid'=>'tag'));
$attribute = $profile->attribute->new();
$attribute->attributeGuid = 'fixedContent'
$attribute->save();
but that didn't work, it created new documents
when i try :
class Models_Mongo_Profile extends Shanty_Mongo_Document
{
protected static $_db = 'monggo';
protected static $_collection = 'profile';
protected static $_requirements = array(
'guid' => 'Required',
'attribute' => 'DocumentSet',
'attribute.$.attributeGuid' => 'Required',
'attribute.$.defaultValues' => array('Required' => null),
'attribute.$.viewOrder' => array('Required' => null)
);
}
$profile = Models_Mongo_Profile::one(array('guid'=>'tag'));
$profile->attribute->find(array('viewOrder'=>0));
error:
Shanty_Mongo_DocumentSet::$_collection is null
The text was updated successfully, but these errors were encountered: