Problem using update

13 views
Skip to first unread message

Jan Engler

unread,
Jan 4, 2010, 4:04:39 AM1/4/10
to jcrom
Hi Guys,

first of all: Happy new Year!
I have some problems with Jcrom (1.3.2) + Jackrabbit.
I have an Object (called ELO) that consists of many fields. One
childNode of this Object is called Metadata which is an Object which
contains a List with some key-value pairs.
If I store this ELO (using eloDao.create(eloEntry)) and I retrieve it
using eloDao.getVersion(eloPath, version) with Version 1.0, it works
very well.

After that I update one value of one metadata and call eloDao.update
(eloEntry) on this ELO. Now I try to retrieve this ELO (with the new
Version number). But now only the first entry of the metadata-list of
this ELO is retrieved....

Do you have any idea or hint where I should look? The weird thing is:
This behavior only occurs when updating the Object...simple storing
and retreiving works quite nice.

Thx for your help!

Cheers,
Jan

Jan Engler

unread,
Jan 8, 2010, 9:40:47 AM1/8/10
to jcrom
Hi,

the problem is fixed using a dirty hack. There is this line 157 in
ChildNodeMapper (trunk version).

if (childPath == null || childPath.equals("")
|| !childContainer.hasNode
(mapper.getCleanName(mapper.getNodeName(child)))) {

If I comment out the part after the second ||, then everything works
fine for me. The problem seems to be, that the "clean name" of my node
is the same for all parts of the list. I know that this can only be a
workaround, but all JCrom tests working properly and my code does
also....But if anyone has an idea how to solve my issue without
adapting Jcrom code, please show me!

Now there are new questions:
- Is it possible to update one Object, which is already stored in the
Repository without (!) creating a new version of it?
- I have some performance issues when storing and retrieving objects
using the dao. Are there some tweaks (like properties of Jackrabbit)?

Thx in advance,

Cheers,

Jan

Reply all
Reply to author
Forward
0 new messages