I finally figured out that not the Thing was lost but the Resource which I assigned to the Thing. Since I did not set a property on the resource, but only added it to the Thing as groundingOccurence it was never synced to the storage. Now that I call setIdentifier for each resource it works as expected.
Cheers, Chris On Monday 14 February 2011 19:12:58 Christian Mollekopf wrote: > Hi, > > I have a small issue where I seem to lose the groundingOccurence (Resource) > of a Thing. > > I'm working with akonadi::items of which i create resources like this: > > Nepomuk::Resource res( item.url() ); > > of this resource i retrieve the thing via: > > Nepomuk::Thing thing = res.pimoThing(); > thing.addType(Nepomuk::Vocabulary::PIMO::Task()); > > This thing is then used for tagging and stuff. > > Now I added a feature which converts an akonadi todo into an akonadi note, > which means the resource changes but all the tags should remain. > For this i delete the old akonadi item and create a new one of the new > type, which makes of course the old Resource invalid. > So that I can keep all Nepomuk relations I just wanted to assign the new > resource to the old thing like this: > > oldThing.addGroundingOccurrence(newResource); > > This works fine on the first look, but when I restart the program all the > tags I assigned vanished. > Is there something else which I need to do so the new groundingOccurrence > of the thing is synced to the RDF store? > > I don't really understand when the data is stored, but so far I just > assumed this happens instantly and all worked well so far... > > Cheers, > > Chris > _______________________________________________ > Nepomuk mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/nepomuk _______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
