Hi there,

Oleg fix solved my problem with foreign key violation.
 I am now having another issue with OTM.

I have:
<class-descriptor
    class="org.apache.jetspeed.prefs.om.impl.NodeImpl"
    table="PREFS_NODE"
>
....
<collection-descriptor
        name="nodeProperties"
       
element-class-ref="org.apache.jetspeed.prefs.om.impl.PropertyImpl"
        refresh="true"
        auto-delete="false"
        auto-update = "true"
        auto-retrieve = "true"
    >
        <documentation>This is the reference to a node
properties.</documentation>
        <inverse-foreignkey field-ref="nodeId"/>
    </collection-descriptor>
....

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?

Thanks.

David Le Strat.
_______________________________

Debug Log:

DEBUG: org.apache.ojb.broker.accesslayer.RsIterator -
RsIterator[org.apache.ojb.broker.accesslayer.RsQueryObject[query:
Query from class
org.apache.jetspeed.prefs.om.impl.PropertyImpl where
[nodeId = 5], class descriptor:
org.apache.jetspeed.prefs.om.impl.PropertyImpl]]
initialized
DEBUG: org.apache.ojb.broker.accesslayer.RsIterator -
hasNext() -> false
DEBUG: org.apache.ojb.broker.accesslayer.RsIterator -
hasNext() -> false
DEBUG: org.apache.jetspeed.prefs.impl.PreferencesImpl
- New property value: [propertyName0, true]
DEBUG: org.apache.jetspeed.prefs.impl.PreferencesImpl
- Updated properties: 1
DEBUG:
org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
executeUpdate : [[parentNodeId, 4], [nodeName,
propertyset1], [nodeType, 0], [fullPath,
/user/principal1/propertyset1], [creationDate,
2004-02-29 02:40:29.378], [modifiedDate, 2004-02-29
14:04:45.144]]
DEBUG:
org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
executeUpdate : [[parentNodeId, 4], [nodeName,
propertyset1], [nodeType, 0], [fullPath,
/user/principal1/propertyset1], [creationDate,
2004-02-29 02:40:29.378], [modifiedDate, 2004-02-29
14:04:45.144]]
DEBUG:
org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl
- SQL:UPDATE PREFS_NODE SET
PARENT_NODE_ID=?,NODE_NAME=?,NODE_TYPE=?,FULL_PATH=?,CREATION_DATE=?,MODIFIED_DATE=?
WHERE NODE_ID = ?
DEBUG:
org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl
- SQL:UPDATE PREFS_NODE SET
PARENT_NODE_ID=?,NODE_NAME=?,NODE_TYPE=?,FULL_PATH=?,CREATION_DATE=?,MODIFIED_DATE=?
WHERE NODE_ID = ?
DEBUG:
org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
executeUpdate:
[EMAIL PROTECTED]
DEBUG:
org.apache.ojb.broker.accesslayer.JdbcAccessImpl -
executeUpdate:
[EMAIL PROTECTED]
DEBUG:
org.apache.ojb.broker.accesslayer.StatementManager -
closeResources was called
DEBUG:
org.apache.ojb.broker.accesslayer.StatementManager -
closeResources was called

--- Oleg Nitz <[EMAIL PROTECTED]> wrote:
> Hi David,
> 
> If you use otm-dependent relations, then check the
> current CVS HEAD - I've 
> just committed the fix. If not, then give more
> detailed description of your 
> case.
> 
> Regards,
>  Oleg
> 
> On Sunday 29 February 2004 08:09, David Le Strat
> wrote:
> > Hello there,
> >
> > I am using OTM with M-N mapping. I am having an
> issue
> > with OTM, where OJB violate foreign key
> constraints.
> >
> > I have the following mapping:
> >
> > PREFS_NODE <-- PREFS_NODE_PROPERTY_KEY -->
> > PREFS_PROPERTY_KEY
> >
> > With OTM, OJB tries to delete PREFS_PROPERTY_KEY
> > before removing PREFS_NODE_PROPERTY_KEY therefore
> > violating foreign key constraint.  Has anybody
> else
> > experienced the same behavior.
> >
> > Regards,
> >
> > David Le Strat.
> >
> > __________________________________
> > Do you Yahoo!?
> > Get better spam protection with Yahoo! Mail.
> > http://antispam.yahoo.com/tools
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to