This JBossQL query is not related to the sql you posted. JBossCMP will generate an alias like t0_co for the Companies table, and specifically will not generate the alias t0_bf.
Also the second query is simply a load query and does not affect the ordering of a finder.
There is an existing bug that occurs when query results returned as a java.util.Set. When the results are returned they are loaded into a Set and the set scrambles the order.
Can someone give more detail on the "order by" bug? Where is the order scrambled by the usage of a Set? Thanks.
if your finder is declared to return a java.util.Set rather than a java.util.Collection, then the effect of the ORDER BY in the query is lost because the Set implementation used is unordered.