Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Tobias Käfer
PLEASE don't use DB specific (native) SQL!
August 19, 2010 1:31 AM
Answer

Tobias Käfer

Rank: Regular Member

Posts: 128

Join Date: March 28, 2008

Recent Posts

Hi!

In the last two to three days I found a lot of issues, that are related to native SQL statements:


So what are the alternatives?
Using Hiberante Criteria or HQL? Maybe, if you can live with the restrictions (eg. no UNION statement) of Hibernate.

Using your own generic SQL language? You already do this:
the file portal-impl/src/custom-sql/portal.xml has some generic SQL statements in it, like "CAST_TEXT" or "MOD". These are transformed by the class com.liferay.portal.dao.orm.common.SQLTransformer

So PLEASE check your SQL statements with different DB engines.
Otherwise you have to say Liferay does only work with the Oracle 10, MySQL, PostgreSQL and that's it!

Cheers
Tobias
Brian Chan
RE: PLEASE don't use DB specific (native) SQL!
August 20, 2010 11:48 AM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 751

Join Date: August 4, 2004

Recent Posts

Thx Tobias. Most of those tickets have been fixed now.
Tobias Käfer
RE: PLEASE don't use DB specific (native) SQL!
August 20, 2010 11:54 AM
Answer

Tobias Käfer

Rank: Regular Member

Posts: 128

Join Date: March 28, 2008

Recent Posts

I see big improvements in handling issues!
Thanks to all the developers, that are fixing those things in the trunk.

Keep it up like this!
Tobias Käfer
RE: PLEASE don't use DB specific (native) SQL!
August 21, 2010 4:18 AM
Answer

Tobias Käfer

Rank: Regular Member

Posts: 128

Join Date: March 28, 2008

Recent Posts

BTW:
I checked the solutions to my issues, that are in trunk right now. And it is good to see, that you enhanced them. Some of them where pretty rough fixes, that just matched our needs.
So thumbs up for the better solutions you made! emoticon
(eg. the fix for DLFolderFinderImpl and QueryUtil)

cheers
Tobias
Tobias Käfer
RE: PLEASE don't use DB specific (native) SQL!
August 26, 2010 9:51 PM
Answer

Tobias Käfer

Rank: Regular Member

Posts: 128

Join Date: March 28, 2008

Recent Posts

Another issue that is related to DB specific SQL statements:
LPS-12309