[Dbix-class] Unexpected ORDER BY in query
    Ben Staude 
    sben1783 at yahoo.de
       
    Fri Jan  5 14:22:32 GMT 2007
    
    
  
Hi all,
I hope my question can be answered "generally" so I don't have to go too much 
into the details of my dbic setup...
Here's my problem:
I select rows in a table and use prefetch to also select a has_many 
relationship. The select itself is ok, but it contains an "ORDER BY" 
statement that I can't explain. It orders by the first column of the 
connection table.
I eliminated every order_by in the project's complete source code; it didn't 
help. I don't use sort_column() anywhere.
If I add an order_by to the ResultSet attributes, this column is added to the 
ORDER BY in front of the "unwanted" sort-column.
Is there any chance you can tell what's happening here? Of course, I suspect 
my schema to be broken in some way, but there must be a place in DBIC's code 
where the ORDER BY is added for some reason. What would be possible reasons?
Thanks a lot in advance!
Ben
	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
    
    
More information about the Dbix-class
mailing list