db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Le Strat <dlest...@yahoo.com>
Subject Re: [OTM] collection-descriptor issue with latest from head.
Date Mon, 01 Mar 2004 15:12:09 GMT
Hello,

I am having the weirdest issue, any suggestion;

Basically, I want to add a collection of properties to
a node.

In my test, I have only 1 property:

Properties: [[nodeId, 5], [propertyKeyId, 21],
[propertyKey,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@162d950],
[propertyValue, true], [creationDate, 2004-03-01
10:03:14.812], [modifiedDate, 2004-03-01
10:03:14.812]]

I open the transaction and do setNodeProperties on the
node object.

The transaction is open, just before committing, I
check to see that the properties are set correctly on
the object:

DEBUG: org.apache.jetspeed.prefs.impl.PreferencesImpl
-

Node for update: [[parentNodeId, 4], [nodeName,
propertyset1], [fullPath,
/user/principal1/propertyset1], [nodeType, 0],
[nodeKeys,
[org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@952905,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@b83be0,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@1
631573,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@1533c8]],
[nodeProperties, [[[nodeId, 5], [propertyKeyId, 21],
[propertyKey,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@162d950],
[propertyValue, true], [creationDate, 2004-03-01
10:03:14.812], [modifiedDate, 2004-03-01
10:03:14.812]]]
], [creationDate, 2004-03-01 09:34:13.138],
[modifiedDate, 2004-03-01 10:03:14.812]]


As you can see [nodeProperties,...] is set, I also
change the [modifiedDate, ...].

When I close the transaction, I get [nodeProperties,
[]]: the nodeProperties collection is gone...

But [modifiedDate, 2004-03-01 10:03:14.802] is still
there.

I can't think of anything that would cause this
behavior.  Any help is appreciated.


DEBUG:
org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
executeUpdate : [[parentNodeId, 4], [nodeName,
propertyset1], [fullPath,
/user/principal1/propertyset1], [nodeType, 0],
[nodeKeys,
[org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@162d950,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@a
937cd,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@18e899c,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@ec8784]],
[nodeProperties, []], [creationDate, 2004-03-01
09:34:13.138], [modifiedDate, 2004-03-01
10:03:14.802]]
DEBUG:
org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
executeUpdate : [[parentNodeId, 4], [nodeName,
propertyset1], [fullPath,
/user/principal1/propertyset1], [nodeType, 0],
[nodeKeys,
[org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@162d950,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@a
937cd,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@18e899c,
org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl@ec8784]],
[nodeProperties, []], [creationDate, 2004-03-01
09:34:13.138], [modifiedDate, 2004-03-01
10:03:14.802]]


Regards,

David.


--- Oleg Nitz <on@ukr.net> wrote:
> On Sunday 29 February 2004 19:24, David Le Strat
> wrote:
> > When I update the NodeImpl with new nodeProperties
> (a
> > collection), only the NodeImpl object gets updated
> and
> > the nodeProperies are not created.
> >
> > I have done this in the past with PB with out any
> > issues.  Any suggestions?
> With auto-update="true" nodeProperties should be
> creates, whatever you use, 
> PB or OTM. I've just done correspondent test with
> OTM, and all is okay.
> So please send me code snippet or just try to do the
> same with PB.
> OTM does nothing special when auto-update="true", it
> just calls 
> broker.store(). If you set auto-update="false" and
> otm-dependent="true", then 
> OTM itself will take care about creation and
> deletion of nodeProperties.
> 
> Regards,
>  Oleg
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> ojb-user-help@db.apache.org
> 


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message