SHARE
TWEET

Untitled

a guest Jun 18th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @JoinColumn (name = "PEDIDO_ID",
  2.  referencedColumnName = "ID")
  3. @ManyToOne (opcional = falso)
  4.  private Pedido pedidoId;
  5.      
  6. public List<Detallepedido> buscarDetalle(int codigo){
  7.  List<Detallepedido> list = null;
  8.  String consulta;
  9.  try{
  10.     query = "SELECT d FROM Detallepedido d WHERE d.pedidoId.id =? 1";
  11.     Query query = em.createQuery (consulta);
  12.     query.setParameter (1, codigo);
  13.     list = query.getResultList ();
  14.   } catch (Exception ex) {
  15.     //throw ex
  16.   }
  17.    return list;
  18.   }
  19.      
  20. Detallepedido det = new Detallepedido ();
  21.  int codigo = det.getPedidoId ();
  22.      
  23. public List<Detallepedido> getMaestroDetalle () {
  24.  // masters es una list<Detallepedido>
  25.  maestros = ejbFacade.buscarDetalle(codigo);
  26.  return maestros
  27.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top