This patch provides the fundamentals to resolve an issue where the sorting of null values were inconsistent (sometimes sorting first and other times sorting last). Specifically, this patch allows one to create an order-by clause via any of the order-by elements of "-myField NULLS LAST" where this text parses out the - (as descending) and the "nulls last".
Since not all databases support the "nulls" argument on an order by clause (it was introduced as part of the OLAP support specification) , our entity-engine.xml file allows each data source to indicate if it has this support. If the support does not exist and nulls first/last is specified, the sql that is generated uses native sql to simulate the nulls first/last intent. At this time, the derby, postgres, and oracle databases are marked to use the nulls first grammar.
Right now, if you do not specify "NULLS XXX" in the field-name for the order-by it makes no change whatsever (naturally this assumption could be changed to have a default).
It should be noted, that my intent here was ultimately to "properly" model the order by into something whose xml representation could look something like ...
<entity-order-by field-name="fieldName" ascending="true" nulls-first="true" />
Divesh Dutta added a comment - 07/May/10 01:44 AM HI Bob, This patch works as expected for derby, postgres, and oracle databases as you have already mentioned. Cant we have some generic solution which supports all the databases. Or we can have some conditional code, where we can check which datasource is being used, and then generate the sql accordingly. Please let me know your views on this.
Bob Morley added a comment - 07/May/10 08:07 AM
Hi Divesh,
I added a more detailed description in the forum thread; but in brief this is a generic solution which supports all databases which generates the sql accordingly. What this patch does not do is apply a standard default order for all databases; it just adds support for one to dictate how they want the nulls sorted.
For example, when one sets the order-by they can set it to "lastName DESC NULLS FIRST" which should apply to all databases.
The thread Bob was referring above ends at http://markmail.org/message/47z7fwtawehuem6b
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950901 13f79535-47bb-0310-9956-ffa450edef68
Data to associate the country with states isn't present. This issue is with reference to discussion started by R.S. on user-mailing list subjected as "StateList"
R.S., thanks for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950893 13f79535-47bb-0310-9956-ffa450edef68
This fixed a bug with inactive financial account(s) which does show up while creating a new payment or creating a batch of payments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950892 13f79535-47bb-0310-9956-ffa450edef68
For AGGREGATED product, the service "calculateProductPrice" doesn't refer to a product store, in order to select the right registered product price between different productStoreGroupId.
This patch add productStoreId to the price context in order to select the right registered product price
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950870 13f79535-47bb-0310-9956-ffa450edef68
In the Drop Down field is always the Key Catalog_Category selected. This Patch change the behavior and select a default product Category Type Id
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950864 13f79535-47bb-0310-9956-ffa450edef68
The ProdCatalogCategoryType didn't have a parent Relation. Here is a fix that added a parentTypeId field and the relation definition
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950861 13f79535-47bb-0310-9956-ffa450edef68
With reference of mail at developer mailing list (sub: Contact List Status.) Add two more status for Contact List
* Unsubscription pending : CLPT_UNSUBS_PENDING
* Unsubscribed. : CLPT_UNSUBSCRIBED
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950498 13f79535-47bb-0310-9956-ffa450edef68
It was harder than I though because of the async nature of Ajax. So I had to use a setTimeout with a 400 ms timeout. Hopefully it will work in any environments. I chose 400 because I found it worked well on my machine, 300 also but to be sure I picked 400, 200 was too low it seems.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950481 13f79535-47bb-0310-9956-ffa450edef68
a StringBuilder, and deprecate the old versions that don't.
This works now because of the previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950339 13f79535-47bb-0310-9956-ffa450edef68