How disable AutoAlias in Aurelius ?

Hi, I'm creating a SQL with Aurelius dynamically, I'm adding the alias with As_(...) but the same it is not in the SQL query:

Final query:

SELECT 
	A.SESSION_ID As f0_, 
	A.ACTOR As f1_, 
	A.PEER_IP As f2_, 
	A.START As f3_, 
	A.STOP As f4_, 
	count(A.SESSION_ID) As f5_
FROM 
	EL_EVENTS A
WHERE  
	((((((A.CHANNEL_ID = :p_0 And A.CLIENT_ID = :p_1) And A.START >= :p_2) And A.START <= :p_3) And A.SESSION_ID = :p_4)))
GROUP BY  
	A.SESSION_ID, A.ACTOR, A.PEER_IP, A.START, A.STOP
ORDER BY  
	f0_ Desc,
	A.STOP Desc

Debugging I can see that the TCriteria.AutoAlias is true and the ProcessAutoAlias is invoked.

What's wrong ?

Thanks.

Esteban

The "aliases" in Aurelius are all related to objects, not SQL. The As_ will create an alias for projected results, and auto alias means that you can do joins directly referring to a sub property without having to call CreateAlias in advance.

None of those problems affect the "internal" SQL aliases, and those are not modifiable.

Ok, thanks, I solved the problem that I had with alias conflicts, I needed group by SESSION_ID and count on same, I added a field Count to the GraphQL type and used this as alias on SESSION_ID field count projection.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.