Author: antoine Date: Sun Feb 11 19:36:40 2007 New Revision: 506250 URL: http://svn.apache.org/viewvc?view=rev&rev=506250 Log: use a different db-ojb method to be able to build in gump
Modified: jakarta/slide/trunk/WHATSNEW jakarta/slide/trunk/src/stores/org/apache/slide/store/ojb/property/ElementListPropertyHandler.java Modified: jakarta/slide/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/jakarta/slide/trunk/WHATSNEW?view=diff&rev=506250&r1=506249&r2=506250 ============================================================================== --- jakarta/slide/trunk/WHATSNEW (original) +++ jakarta/slide/trunk/WHATSNEW Sun Feb 11 19:36:40 2007 @@ -21,5 +21,7 @@ * Patch allowing Slide to work with httpclient version 3.0 Bugzilla 35213. +* one change in org/apache/slide/store/ojb/property/ElementListPropertyHandler.java, store(PersistenceBroker broker, PropertyPeer propertyPeer, NodeProperty property) + to be able to build in gump Modified: jakarta/slide/trunk/src/stores/org/apache/slide/store/ojb/property/ElementListPropertyHandler.java URL: http://svn.apache.org/viewvc/jakarta/slide/trunk/src/stores/org/apache/slide/store/ojb/property/ElementListPropertyHandler.java?view=diff&rev=506250&r1=506249&r2=506250 ============================================================================== --- jakarta/slide/trunk/src/stores/org/apache/slide/store/ojb/property/ElementListPropertyHandler.java (original) +++ jakarta/slide/trunk/src/stores/org/apache/slide/store/ojb/property/ElementListPropertyHandler.java Sun Feb 11 19:36:40 2007 @@ -126,7 +126,20 @@ value += "/>"; propertyPeer.setValue(value); broker.store(propertyPeer); - QueryByCriteria query = new QueryByCriteria(propertyPeer); + /* + suggestions of Armin Waibel on the ojb-user list, Feb 10, 2007 + based on latest from OJB_1_0_RELEASE branch (1.0.5): + // build query out of all non-null fields + Query query = QueryFactory.newQueryByExample(template); + or + // build query based on object identity (all PK's, other fields will be ignored) + Query query = QueryFactory.newQuery(template); + or + // use findByIdentity, similar to QueryFactory.newQuery(template) + Identity oid = broker.serviceIdentity().buildIdentity( PropertyPeer.class, new Long(propertyPeer.getPropertyId())); + propertyPeer = (PropertyPeer) broker.getObjectByIdentity(oid); + */ + Query query = QueryFactory.newQueryByExample(propertyPeer); propertyPeer = (PropertyPeer)broker.getObjectByQuery(query); if ( propertyPeer == null ) throw new PropertyHandlerException("Could not retrieve stored property: " + property.getNamespace() + ":" + property.getName()); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]