(this is for 1.1.3pr1 in cvs and may also help with 1.1.3pr1 release)

OK I mananaged to find a temporary work around to the ordering problem
when using a tag such as the following:

<db:dbform multipart="false" autoUpdate="false"
followUp="/order_test_single.jsp" maxRows="3" tableName="order_test" 
orderBy="n3">

I had to make sure that my dbforms-config looked like:

 <table name="order_test"
                    defaultVisibleFields="n3,n2,n" >...

and not 

<table name="order_test"
                    defaultVisibleFields="n,n2,n3" >

and n3 needed to be a key.


Also,

We should always be using:

 a]  whereClause="where n3>4 order by n3"

instead of 

b] whereClause="where n3>4" orderBy="n3"

because unless it is changed, as Luca pointed out the orderBy clause is
ignored
 
b] results in 

INFO [Thread-5] (Table.java:915) - ::getFreeFormSelectQuery -- [SELECT
n, n2, n3  FROM order_test where n3>4]

QUESTION: Do a and b need for some reason to be interchangeable (used
either way) and do we need to make b also possible too?????
_________________________________________________________________

Anyway with whereClause="where n3>4 order by n3" everything works fine

INFO [Thread-5] (Table.java:915) - ::getFreeFormSelectQuery -- [SELECT
n, n2, n3  FROM order_test where n3>4 order by n3]

but with subsequent use of navNext the ordering is incorrect and the
where clause looks like it is in error

 INFO [Thread-3] (Table.java:884) - ::getSelectQuery - [SELECT n, n2,
n3  FROM order_test WHERE ( (n> ?  )  OR (n3> ?  AND n>= ?  ) ) ORDER BY
n,n3]

So at this point I think we have two problems.

1) incorrect usage and bad documentation:  whereClause="where n3>4 order
by n3" should be used instead of whereClause="where n3>4" orderBy="n3"

2)getSelectQuery is not setting up a query correctly

I need to look at getSelectQuery in detail and also see if my thinking
holds true when I try a filter in the dbform tag.
 
-- 
shawn <[EMAIL PROTECTED]>



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to