I think I run into same issue while playing with BigBank... where I had to
register the types with SDO first..

Yes, this sounds like a good enhancement... to have DAS taking care of the
registration part, as long as it's registered in the DAS config... and would
make the customer experience much simpler.

+1

- Luciano

On 10/31/06, Kevin Williams <[EMAIL PROTECTED]> wrote:

In writing up some documentation around the use of the RDB DAS with
Static Types I noticed something a bit clunky.  Here is a current
exampleout of the RDB DAS test suite:

    public void testUserProvidedModel() throws SQLException {

        *SDOUtil.registerStaticTypes(CustomerFactory.class);*

        DAS das =
DAS.FACTORY.createDAS(*getConfig("staticCustomerOrder.xml")*,
getConnection());
        Command select = das.getCommand("Customer and Orders");
        select.setParameter(1, Integer.valueOf(1));

        DataObject root = select.executeQuery();

        // Modify a customer
        Customer customer = (Customer) root.getDataObject("Customer[1]");
        customer.setLastName("Pavick");

        // Modify an order
        AnOrder order = (AnOrder) customer.getOrders().get(0);
        order.setProduct("Kitchen Sink 001");

        // Flush changes
        das.applyChanges((DataObject) root);

    }

What seems clunky is that the the user must specify the Types to the DAS
in the config file ("staticCustomerOrder.xml") and also register the
Types with the SDO runtime via:
*"SDOUtil.registerStaticTypes(CustomerFactory.class)"*  It might make
sense for the DAS to register the Types based on the confg info as a
convienience for the user.

Any thoughts?

--
Kevin
*
*


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


Reply via email to