-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem to call a stored procedure to update table
PostPosted: Fri Mar 20, 2015 12:27 pm 
Newbie

Joined: Fri Mar 20, 2015 12:14 pm
Posts: 1
Hi all,

I'm using Spring Data in my project and I'm calling a stored procedure to update a table in my database.
Here is my entity class...

Code:
@Entity
@Table(name = "USUARIOEMPRESA")
@SequenceGenerator(name="INC_USUARIOEMPRESA", sequenceName="INC_USUARIOEMPRESA")
@NamedStoredProcedureQuery(name="INSERIR_USUARIO_EMPRESA_TESTE.atualizar_senha_usuario",
                     procedureName="INSERIR_USUARIO_EMPRESA_TESTE.atualizar_senha_usuario",
                     parameters={@StoredProcedureParameter(mode=ParameterMode.IN, name="codigoUsuarioEmpresa", type=Long.class),
                              @StoredProcedureParameter(mode=ParameterMode.IN, name="senha", type=String.class)})
public class UsuarioEmp implements Serializable, Auditavel {

//My class implementation
}


Here is my Spring Data Repository

Code:
public interface UsuarioEmpresaRepository extends JpaRepository<UsuarioEmp, Long> {
//some methods here


   @Procedure("INSERIR_USUARIO_EMPRESA_TESTE.atualizar_senha_usuario")
   void procedureAlterarSenhaUsuarioEmpresaSistemaLegado(Long codigoUsuarioEmpresa, String senha);
}


The hibernate gets call the procedure normally but my table is not updated

May anybody tell me what is ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.