I have been using Torque for quite sometime. Torque is a great tool for it's intended purpose. You can't compare Torque to .NET. Torque is great at promoting database independence and resolving the impedance mismatch between objects and database. And it's free. .NET may have some more powerful features, but why don't you try hooking it up to MySQL, SQL Server, Oracle, and Sybase with almost no modification. The point is you can't do this with .NET, but Torque can do it. As for outer joins, it is a problem with Torque, but I have been able to work around it with more than one query. This may not be optimal, but if you design your caching correctly, then it should not be a problem. Or just use MySQL and you don't need a cache!
As for the problem at hand, your query contains Oracle specific functions, so just use executeQuery() for this condition. However, you should find great success using Torque with most of your other queries provided then follow ANSI standards. Regards, Tom -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 1:41 PM To: [EMAIL PROTECTED] Subject: Re: question on Torque's limitation This is not a matter of how one thinks. It's a matter of can or cannot, and to what degree of easiness and efficiency. If Torque's OM can solve the issue I stated without multiple db hits for performance's sake, I wouldn't mind to think in terms of OM. But if OM cannot match the flexibility of SQL, which is what Torque is trying to replace as API, then it is fruitless no matter how hard you think in Torque's way. Torque OM simply cannot live up to such a modest expectation. In fact, I would be open to another OM tool, lest to say breaking Torque's OM. >From my investigation, Torque's limitation is molded in its design. Torque's OM is built out of a Table of a database. Comparing with Microsoft's .Net's dataset OM, which can be built out of an ad hoc query and modified at design time in the format of XML, the technology lag of Torque is apparent. Fred ----- Original Message ----- From: "Mark Lowe" <[EMAIL PROTECTED]> To: "Turbine Torque Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 6:39 AM Subject: Re: question on Torque's limitation > I'm also pretty new to torque but resorting to SQL breaks the model.. > > My understanding is that you should have to think in terms of SQL but > in terms of the object model, which is the whole point. I'll have a > look over the documentation, but I'd be very disappointed if it was the > case that you'd have to do this. From what I've seen so far the api > would only be more complex than it needs if you're still thinking in > SQL rather than Objects. > > My money is on all this being possible without breaking any design > patterns (e.g. resorting to sql). I'll drop another posting when I've > taken a look and can be more helpful. > > Cheers mark > > On Tuesday, Jul 1, 2003, at 09:34 Europe/London, Sam Le Berrigaud wrote: > > > Hello, > > > > I am also quite new to Torque. But what I think I would is not use > > Criteria to do so, I would rather use the executeQuery method in which > > you can write your own SQL with no problem. Maybe you could also try > > to write your own criteria as shown in criteria how-to in the section > > simplifying Criteria. > > > > Regards, > > > > SaM > > > > [EMAIL PROTECTED] wrote: > > > >> Suppose I have an Oracle table called A and a table called A_TR (TR > >> stands for translation) for multi-language support. These two tables > >> contain following columns respectively: > >> A.ID (pk), A.NAME > >> A_TR.ID(pk, fk to A.ID), A_TR.LOCALE (pk), A_TR.NAME > >> > >> If I want to get A_TR.NAME if it is available, othwise use A.NAME. > >> Using SQL, I can get it pretty easily: > >> select nvl(A_TR.name,A.name) as name from A, A_TR where > >> A.id=A_TR.id(+) and lower(A_TR.locale(+)) = lower('en-us') > >> > >> But it seems in Torque this will be awefully complex if not > >> impossible (unless I resort back to brute force SQL). The > >> complication arises from: > >> 1. Creteria doesn't support outer-join > >> 2. The peer class doesn't support ad hoc SELECT clause. I can only > >> get the columns within a table. Combining columns in two tables with > >> Oracle function such as NVL is almost impossible. > >> > >> Since I am new to Torque, I would like confirmation if these indeed > >> are limitation of Torque. Is there any get-around that doesn't need > >> multiple db hit (don't take query cache into account)? > >> > >> Thanks > >> > >> > >> > >> > >> --------------------------------------------------------------------- > >> 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] > > > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
