Hi guys,

When we do searches for BusinessEntities, BindingTemplates, Services and TModels we sort by name. However the name is not in the business_entity table, but rather in the business_name, because multiple business names can be given (for different locales). In the code we select the business entity and then try to sort by name. Some dbs think this is ok, but in fact most of them do not like it (including Derby). You get an error which is explained pretty well in this article: http://weblogs.sqlteam.com/jeffs/archive/2007/12/13/select-distinct-order-by-error.aspx

So we can fix this by not doing a "select distinct" but rather doing a "group by". However it begs the question what it means to sort by name.. I guess you'd only want to sort within one locale, but we may not always have a name in each locale. So should we simply sort
by business_entity key instead?

Here are some examples:
./src/main/java/org/apache/juddi/query/FetchBindingTemplatesQuery.java: private static void appendSortTables(DynamicQuery qry) ./src/main/java/org/apache/juddi/query/FetchBusinessEntitiesQuery.java: private static void appendSortTables(DynamicQuery qry) ./src/main/java/org/apache/juddi/query/FetchBusinessServicesQuery.java: private static void appendSortTables(DynamicQuery qry) { ./src/main/java/org/apache/juddi/query/FetchTModelsQuery.java: private static void appendSortTables(DynamicQuery qry) {

--Kurt

Reply via email to