Guido Sohne wrote:
> 
> I posted to the list earlier but got no response ...
> 
> Criteria only support setting dates and do not (apparently)
> support setting times and parameters in the SQL WHERE clause. I
> am drawing this to your attention since I somehow managed to
> assume that one of you or maybe even both are resident experts
> :-) active on the lists.
> 
> Without allowing times to be parts of criteria used in doselect,
> using Criteria objects becomes less useful especially as soon as
> one needs to work with stuff that is based on time.
> 

Please submit a patch, if you already did, I apologize I missed it. 
Please note that you can add any Object to a Criteria as long as it has
some mapping to a jdbc type.  Can you localize the problem?

> Am working on building a team of developers around turbine and
...
> 
> One issue I've run into is the torque object model. The peer
> stuff is generally good - I've not taken a good look at the
> complex om but what I'd like to see is virtual fields.
> 
> eg. with a customerid, i'd like to be able to retrieve a string
> consisting of the customer first name + last name to be used for
> display purposes.
> 

Something like:

Customer c = invoice.getCustomer();
String name = c.getFirstName() + c.getLastName();

is possible with the complex om model.  There could be a lot of work
done on this, so feel free to offer improvements.


> Would it be a bad idea to have virtual fields ? ie make the
> linked fields appear to be part of the baseobject derived class
> and do any needed selection/insertion/update/delete behind the
> scenes ?

Again some of this is implemented in the complex model.  It should be
possible to:


Vector lineitems = invoice.getLineItems();
...
(LineItem)lineitem.get(2)).setQuantity(2);
...
LineItem i= new LineItem();
i.setXXX(...)
...
invoice.addLineItem(i);


invoice.save();

The save command will start a transaction if supported, update the
invoice, update one of the lineitems, and add a new lineitem entry
associated with this invoice, commit the transaction.


Of course, this needs a lot of testing and improvement. :)
Objects that encapsulate a view of several tables would be nice to have.

> 
> I think most of the complexity would be in handling all cases
> for delete and update but even having just the selects alone
> would be just great.
> 
> Perhaps the complex om with its join stuff supports this, but am
> looking at this more in terms of 'syntactic sugar' ... something
> built into baseobject derived classes.

Please look into the complex model.

> 
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to