SHARE
TWEET

Untitled

a guest Jun 18th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @JoinColumn (name = "ORDER_ID", referencedColumnName = "ID")
  2.     @ManyToOne (optional = false)
  3.      private Pedido pedidoId;
  4.      
  5. public List <Detallepedido> searchDetail(int code) {
  6.     List <Detallepedido> list = null;
  7.     String query;
  8.     try {
  9.     query = "SELECT d FROM Detallepedido d WHERE d.pedidoId.id =? 1";
  10.     Query query = em.createQuery (query);
  11.     query.setParameter (1, code);
  12.     list = query.getResultList ();
  13.     } catch (Exception ex) {
  14.     throw ex;
  15.     }
  16.     return list;
  17.     }
  18.      
  19. Detallepedido det = new Detallepedido();
  20.     int code = det.getPedidoId ();
  21.      
  22. public List <Detallepedido> getMaestroDetalle () {
  23.     // masters is a list <Detallepedido>
  24.     masters = ejbFacade.searchDetail(code);
  25.     return masters;
  26.     }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top