Posts by Gonzaga Neto • 381 points
42 posts
-
0
votes0
answers14
viewsQ: ngFor directive working, Commonmodule declared correctly, but the editor flags the module declaration error
I am using the *ngFor directive to display the result of an array within a component, the structure is working correctly, however, in the editor (Visual Studio Code), it signals the following error:…
-
0
votes1
answer1488
viewsA: Angular - Can’t bind to 'ngForOf' Since it isn’t a known Property of 'div'
Within the Accounting class the accounts attribute is private, which prevents it from being rendered in the View. The attribute has been modified to public, thus correcting the failure. public…
-
-1
votes1
answer1488
viewsQ: Angular - Can’t bind to 'ngForOf' Since it isn’t a known Property of 'div'
In an Angular8 application the component created does not identify the *ngFor command, and returns error: Can't bind to 'ngForOf' since it isn't a known property of 'div'. View Accounting Component…
-
0
votes1
answer32
viewsA: Prevent the delete of a parent object if it has JPA child objects
I transferred to the bank the responsibility to manage the referential integrity. I changed in applicatoin.propertis the dialect used for JPA chat with Mysql as below:…
-
0
votes1
answer597
viewsA: Springboot - JPA - does not migrate relationships in the entity and relationship diagram
To be able to implement the referential integrity in the Mysql database it was necessary for JPA to create the tables using the Innodb engine, to do this I changed the dialect within the…
-
0
votes1
answer32
viewsQ: Prevent the delete of a parent object if it has JPA child objects
Is there any way defined by JPA that prevents the exclusion of a parent object if it has a child object attached to it? For example: I have the class (Entity) Department, in which I have the…
-
1
votes1
answer246
viewsQ: Perform a method after completion of a previous method in Angular
How to make a method to be executed only after the completion of another method? I understand that in Angular we treat asynchronously, that is, a line of code does not necessarily wait for the…
-
0
votes1
answer905
viewsQ: How to configure Bootstrap 4 with Angular 8.3.6 using angular.json
I am trying to configure Bootstrap 4 in Angular 8.3.6, I am following the following steps: ng new novaAplicação (create the project) npm install bootstrap jquery popper.js --save (install libraries)…
-
1
votes1
answer79
viewsQ: Bootstrap4 select transparent
I implemented a select on a page using Bootstrap-4 classes for styling as below: <select class="form-control" name="inputAssunto" id="inputAssunto" required> <option>Sugestões e…
-
0
votes1
answer46
viewsA: Googlemap does not redenrize the map in Ionic3 app on Android and iOS platforms
I managed to resolve by removing the plugin(ionic cordova plugin remove cordova-plugin-googlemaps) and reinstalling.
-
0
votes1
answer46
viewsQ: Googlemap does not redenrize the map in Ionic3 app on Android and iOS platforms
I developed an Ionic 3 application and implemented the Googlemaps API, when I run the command Ionic Cordova run browser the map works perfectly, but when I will perform the test on Android or Ios…
-
0
votes1
answer214
viewsA: CORS problem in Spring-Rest API and Ionic3 front-end
I identified the mistake. Calmly analyzing the flaw she cites that the supported requests should respect some informed protocol (http, data, Chrome, Chrome-Extension, https). Then I returned to the…
-
-1
votes1
answer214
viewsQ: CORS problem in Spring-Rest API and Ionic3 front-end
I have developed a Back-end Rest application using spring-Rest and front-end in Ionic. I am facing a CORS configuration problem. In Resources methods I used the annotation @CrossOrigin to free all…
-
0
votes1
answer446
viewsQ: How to search for the lowest price in an entity with Spring Data JPA in a Jparepository? (Keywords or JPQL)
I have the following java entity using spring: public class ItemVendedor implements Serializable{ private static final long serialVersionUID = 1L; private ItemVendedorPK id = new ItemVendedorPK();…
-
1
votes2
answers313
viewsA: Spring data Jpa implement generic methods
Surely proper use of interfaces is good practice, they will ensure that a standard is maintained throughout the project because they force the implementation of the methods defined in it. Another…
-
2
votes1
answer43
viewsA: consult and add BD result
Hello, I understand you want to do an SQL query. If this is the case follow the steps with an example database that I created for you to test, in this case I’m using Mysql so in another database the…
-
0
votes2
answers1287
viewsA: Springdata paging with Pageimpl<> size does not work
to achieve the result that needed I ended up changing the approach of the query, before I was performing the query by creating a keyword statement within the Repository, but when I converted this…
-
0
votes1
answer159
viewsQ: JPQL JPA - Create a list grouped by date with the sum and profit of all items sold that day
The SQL query below is returning a wrong result to the fieldEntrega. SELECT DATE(p.dt_pedido) AS barChartLabels, COUNT( DISTINCT p.id) AS qtdPedido, SUM((item.quantidade * item.preco) *…
-
0
votes2
answers1287
viewsQ: Springdata paging with Pageimpl<> size does not work
I created a method within a service class to generate a paged list of products using Springdata (Java Spring Rest application), follow the code: public Page<ProdutoDTOVendedor>…
-
0
votes1
answer67
viewsQ: How do I update the amount of socket.io messages in an Angular Ionic3 app to a particular endpoint?
I want to implement an icon in a view that brings the amount of messages a user has in their box, but the update of quantity information should occur in real time according to the model below…
-
5
votes1
answer663
viewsQ: What would be the best HTTP response to inform the client that it cannot delete a single record?
I have an application where I established the following business rule related to user registration: The user may have multiple addresses linked to him, but it is mandatory that he has at least one…
-
1
votes1
answer492
viewsQ: IONIC3 - Error - Typeerror: Undefined is not an Object (evaluating '_co.person.id') - I can’t find the cause of the error
Hello I am developing an application with Ionic3, but I have an error that I can not find the cause, I thought it was a bug, already restarted the server (Ionic serve --lab) several times but the…
-
0
votes1
answer130
viewsA: Ionic default layout (template)
1 - The solution used was the creation of a standardized footercustom component that can be used on any desired page, for this using Ionic cli created the component: Commando: ionic g component…
-
0
votes1
answer130
viewsQ: Ionic default layout (template)
Hello, I created an application with Ionic where I have several pages. The application initializes with an intro page then goes to the homepage. I wanted to know how to put a standard footer on…
-
1
votes1
answer1910
viewsQ: Ionic - Change app top bar color
Hello, I’m developing an application with Ionic3 and when I start the app in the emulator runs nice, but it is common in the applications the black bar stay in the header color but in a darker tone.…
-
0
votes1
answer505
viewsQ: Align ion-navbar elements - Ionic
Hello, I want to do the alignment of 3 elements (IONIC) inside an ion-navbar but I do not know how to position the elements correctly, could someone help me? Below follows the excerpt of the code…
-
1
votes2
answers1239
viewsA: Pagination with spring date
You can do the following: public interface ClienteRepositorio extends JpaRepository<Cliente, Integer> { Page<Cliente> findByNomeStartingWithAndVendedorEquals(String nome, Integer…
-
2
votes1
answer134
viewsA: @joincolunm with foreignKey Hibernate
Hello, here’s an example of how you can create relationship in your classes. State-class: @Entity public class Estado { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; private…
-
1
votes1
answer737
viewsA: Spring Data JPA - Query via Specification - Manytomany and Join with Multiple Entities
I managed to solve it. I was using the query in the wrong way. Below follows the resolution code: predicates.add(root.join("id").join("produto").join("categorias").get("id").in(categorias)); In…
-
0
votes2
answers1009
viewsA: Specification with Spring Data Jpa passing null parameter
In the class Systemsspecs that you created each method represents a criterion for your query, it is the responsibility of the class user to perform the checks, and as you commented, it ends up…
-
0
votes1
answer737
viewsQ: Spring Data JPA - Query via Specification - Manytomany and Join with Multiple Entities
Hello, I’ve assembled the following Specification class: public class ItemVendedorSpecification implements Specification<ItemVendedor> { private static final long serialVersionUID = 1L;…
-
1
votes1
answer597
viewsQ: Springboot - JPA - does not migrate relationships in the entity and relationship diagram
I am creating a Rest application using Springboot, JPA and as a Mysql database. It works well, but it has something strange when I enter the database. I used Workbench to create the relational…
-
2
votes1
answer746
viewsQ: Consulting in a list (IN) - Predicate and Specification - JPA Criteriabuilder
Hello, I have to create a dynamic query based on the following scenario in a RESTFUL application using Springboot and JPA (I am using Jpaspecificationexecutor): I have two entity classes (Entity),…
-
0
votes1
answer245
viewsA: Beanutils.copyProperties (Ignore more than one field)
Actually there was a mistaken use on my part. The method copy.Pproperties() can ignore more than one field. For this, just keep inserting the fields separated by comma, IE, the class meets the need…
-
0
votes1
answer167
viewsA: JPQL Not recognizing the parameter
The class method below was pointing to the wrong search method, so the parameterized search was not working: public class Categoriaresource { @Autowired CategoriaService categoriaService;…
-
1
votes1
answer167
viewsQ: JPQL Not recognizing the parameter
I need to perform a query using JPQL or Spring-data keyword method. The problem is that the parameter inserted in the query is being ignored, I still could not identify the cause of it. Since the…
-
0
votes1
answer28
viewsQ: Eclipse has stopped claiming the need to declare the serial default Version ID. in the serialized classes
Hello, using Eclipse IDE when we create a class that we inform you should implement serialization (Serializable Implements) is common for the IDE to claim the default serial Version Id. I created a…
-
0
votes1
answer245
viewsQ: Beanutils.copyProperties (Ignore more than one field)
all right? I am using java and spring-framework in a restful project, so I created the following class: Categoria (id, descrição, dtCadastro, dtAlteração) In class I am using the annotations…
-
0
votes1
answer483
viewsQ: Inheritance, polymorphism and access to methods
I have 3 classes and 1 enum: public class Pessoa { private TipoPessoa tipo; public TipoPessoa getTipo() { return tipo; } public void setTipo(TipoPessoa tipo) { this.tipo = tipo; } } public class…
-
0
votes1
answer338
viewsA: Manytomany JPA - Product Category
I managed to resolve, I had implemented the part that inserts the categories in the products, but had not implemented the opposite, insert the products in the category, somehow was generating error…
-
1
votes1
answer685
viewsQ: Omit DTO (Spring Data JPA) attribute
Hello, I have two DTO classes (Categoriadto and Productodto) in a restfull application, how can I omit a certain attribute of Productodto when it is used in the Categoriadto class? Below follow the…
-
0
votes1
answer338
viewsQ: Manytomany JPA - Product Category
Hello, I’m having difficulties in the process of deleting a record that has relationship @ManyToMany. When I delete the record referring to the Product entity with the annotation CascadeType.ALL, it…