Pinaki Poddar wrote:
>
> Hi,
>> I put the Slice "ONE", but when i remove the "hint" clause the result
>> comes for me, but i know that at
>> least one result have to return in this query, i don't know what i'am
>> doing wrong...
>
> Your question is not clear to me.
> 1. Please explain further
> 2. Examine the generated SQL. Each executed SQL is logged with the slice
> name it has been executed on. When you query with or without the hint --
> what SQLs do you see? On which slices are these SQLs being executed?
>
>
OK, let explain the problem!
I'm making a targered query
Query query = em.createQuery("SELECT c FROM Cliente c WHERE c.email
= :email AND c.senha = :senha");
query.setParameter("email", email);
query.setParameter("senha", senha);
query.setHint("openjpa.hint.slice.Target", "TWO");
With this query i want the results of the Slice named "TWO" but the SQL log
sent this for me:
"2078 PersistenceUnit.ONE TRACE [http-8084-1] openjpa.jdbc.SQL - <t
21111684, conn 11387974> executing prepstmnt 2867588 SELECT t0.id, t0.db,
t0.dt_insert, t0.vc_bairro, t0.vc_cep, t0.vc_cidade, t0.vc_complemento,
t0.dt_nascimento, t0.vc_email, t0.vc_endereco, t0.vc_estado, t0.vc_nome,
t0.vc_numero, t0.vc_rg, t0.vc_senha, t0.vc_sexo, t0.vc_telefone FROM cliente
t0 WHERE (t0.vc_email = ? AND t0.vc_senha = ?) [params=(String)
[EMAIL PROTECTED], (String) 010203]"
I put Slice two in the query but it returns for me the slice one...what i'm
doing wrong?
Regards
Thiago Ananias
--
View this message in context:
http://n2.nabble.com/Targeted-Query-in-Slices-tp1580324p1584618.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.