|
[
Permlink
| « Hide
]
Shay Banon added a comment - 08/Jan/08 05:30 AM
You can call CompassSession#save and pass it a resource.
Did not worked for me in 1.2.M2...
ps. In any case a special-purpose method like saveResource(...) would be nice to have. It has a clear name (hard to be mistaken) - and it's just three lines of code to implement it.
Does it work for you in 1.2 GA?
I'll check that and report back.
Sorry, it did not work out.
final Resource resource = session.getResource(recordClass, SEVERE: Servlet.service() for servlet faces threw exception This however works allright: final Resource resource = session.getResource(recordClass, I see what you are trying to do now..., you basically have OSEM mappings, and you wish to save the underlying resource that represents it. Quite an advance usage of Compass, as special care needs to be taken with regards to unmarshalling of that resource afterwards, but it make sense. I will add it.
Thanks.
The scenario is: I have rather large documents in the database and compass index. In this very component I just need to update a single field of the object ("status"). Loading and saving the whole object is too much overhead so I prefer direct operations on the resource. Thanks again. |
|||||||||||||||||||||||||||||||||||||||