Hi:

I am seeing the tutorial4 and there I saw diference between
http://db.apache.org/ojb/tutorial4.html and the code at
src/jdori/org/apache/ojb/tutorial5.

If we see close at the web page there is at "Updating Objects":

// 1. create Identity representing the instance to edit.
        Product example = new Product();
        example.setId(id);
        Identity oid = new Identity(example);

But in the code at: src/jdori/org/apache/ojb/tutorial5/UCEditProduct.java:

// 1. Build a query to look up product with the id


         Product example = new Product();
         example.setId(id);
         PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
         Identity oid = new Identity(example, broker);

Please note the inserted line in the last code (above line "Identity oid
..."):

         PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();

Is this correct? Need be updated the HTML tutorial?

The same apply to "Deleting Objects" (on the HTML) and  UCDeleteProduct.java

Best Regards,

Antonio Gallardo



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

Reply via email to