Hi,    

Why it is not possible to add twice the same column in a SELECT ?


BDTechDB db = dbHandler.getDb();        
DBCommand cmd = db.createCommand();            
cmd.select(db.album.id,db.album.title,db.album.index,db.album.serieId, 
db.serie.title);    
cmd.where(db.album.serieId.is(db.serie.id));

DBCommand cmdUnion = db.createCommand();
cmdUnion.select(db.album.id,>>> db.album.title <<<, 
db.album.index,db.album..serieId,>>> db.album.title <<<); 
cmdUnion.where(db.album.serieId.is(null));

This is usefull in a UNION query when the same number of colum has to be 
provided...
The column db.album.title will be auto removed by empire-db. 
(The tips I found is to add an alias to the column)

Regards,
exxos.
    



      

Reply via email to