Skip to content

Commit

Permalink
gg
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrzz98 committed Feb 12, 2023
1 parent ee8d23b commit a8e392c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class OrdenCompra implements Serializable {
private String observaciones;



@OneToMany(fetch=FetchType.LAZY,cascade = CascadeType.ALL,orphanRemoval = true )
@JoinColumn(name="ID_DETALLE_ORDEN_COMPRA")
@JsonManagedReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class OrdenCompraServiceImpl implements OrdenCompraService {
private final OrdenCompraRepository ordenCompraRepository;
@Override
public ResponseDTO crearOrdenCompra(OrdenCompra ordenCompra) {
if(ordenCompra.getDetalleordencompra() == null){
if(ordenCompra.getDetalles() == null){
return new ResponseDTO(new Date(), HttpStatus.BAD_REQUEST, "Se requieren los detalles.", null);
}
ordenCompraRepository.save(ordenCompra);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ spring.jpa.properties.hibernate.format_sql=true
#spring.jpa.properties.hibernate.format_sql=true


#mysql://ddgbsu830icdyd4t:gggf144b0aai7kqa@z3iruaadbwo0iyfp.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/p63xdnex49r124ub
#mysql://ddgbsu830icdyd4t:gggf144b0aai7kqa@z3iruaadbwo0iyfp.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/p63xdnex49r124ub

0 comments on commit a8e392c

Please sign in to comment.