Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
260 views

How to check if the image value is null or non-null / (exists or not) in Thymeleaf Spring Boot

I display the image in my index page is as follows <img th:src="@{${'/image/'+id}}" /> To check if the value of the image is null or not to avoid displaying the img tag without the ...
Hambagui's user avatar
0 votes
2 answers
259 views

Null value passed from drop-down list

I am creating a Spring Boot application with thymeleaf where I have an relationship Many-to-One between a table named figures and a table named states (many figures to one state). Everything is OK ...
iank's user avatar
  • 113
0 votes
2 answers
838 views

Thymeleaf Spring JPA One to Many type mismatch

I have a Spring Jpa project with a One to Many relationship. The error when submitting form is: Field error in object 'product' on field 'category': rejected value [2]; codes [typeMismatch.product....
Clippit's user avatar
  • 129
1 vote
2 answers
867 views

How to solve n + 1 problem in hibernate for my case?

I have a problem with n + 1 select in hibernate. I looked at a lot of articles on this topic, but I could not understand what my mistake was. My query: public interface ClientRepository extends ...
CringePointerException's user avatar
0 votes
1 answer
160 views

How can I update object from database without inserting new?

i want to update object from my database without inserting new to the DB. here are 2 methods: @RequestMapping("/edit/{id}") public ModelAndView showEditProductPage(@PathVariable(name = &...
maszpet's user avatar
  • 25
1 vote
1 answer
162 views

How to force data as part of form submission with Spring + Thymeleaf + JPA

tldr; I would like an entire object to be persistent in form submission, and not just the parts of the object which were added to the Thymeleaf template. Basically, I'm performing a database query in ...
moonlightcheese's user avatar
0 votes
1 answer
163 views

JPA Query or Custom Query to Find Results Based on Search Term in Two Tables

Im trying to build an extensive search that returns the results from multiple tables. I don't know if I worded that correctly, but I want to be able to return all posts that match a search criteria ...
thelos999's user avatar
  • 653
1 vote
2 answers
954 views

thymeleaf value to html select input

Controller @GetMapping("/kosik") public String kosik(Principal principal,Model model){ User user = userServices.findByEmail(principal.getName()); Cart cart = cartServices.findCartByUser(user);...
joachim's user avatar
  • 47
0 votes
3 answers
2k views

Hibernate Native Query: java.sql.SQLException: Operand should contain 1 column(s)

I will really appreciate if you can check it. I am trying to make optional a query parameter but having a problem with operand count since it is a list. Here is my code: public static final String ...
user2349833's user avatar
1 vote
1 answer
870 views

Trying to create a composite jpa object in Spring + Thymeleaf

I've tried to create an object with another object inside, with a form but the Object picked from a dropdown list gets converted into a String when returned from the Thymeleaf form. Those are the ...
Julian Bautista's user avatar
-2 votes
1 answer
272 views

Field select error thymeleaf selector binding

Why th:field=*{platform} does not work I have been tried to add th:field=*{platform.platformId} but it persist This is the error org.thymeleaf.exceptions.TemplateProcessingException: Error during ...
Justin Zuñiga Torres's user avatar
3 votes
1 answer
4k views

How to fix ' org.hibernate.TransientPropertyValueException'?

I'm setting up client side shopping cart in my web application. All was ok before adding Shopping Cart class and his service. Now when I try to start the Spring application this error is shown: ...
Francesco31's user avatar
2 votes
1 answer
395 views

Property or field 'location' cannot be found on object of type javascript

I having troubles to get the object in javascript expression Thymeleaf, How can I resolved? I m trying to fill a select option with the Location by javascript expression but i dont know i can access ...
Justin Zuñiga Torres's user avatar
3 votes
3 answers
3k views

Wrong LocalDate stored with hibernate

I'm trying to store inside the database the date of a restaurant booking but, even though the date I submit is correct, hibernate stores inside the database a date one day before the one I submitted. ...
Stefano Sambruna's user avatar
0 votes
0 answers
33 views

OneToMany entity parent field giving null after being set by parent

I'm trying to submit a form with Quiz as form backing entity and some Question inside of it. These two entities are related in a bidirectional association: @Getter @Setter @ToString(exclude = { "...
Elliot RG's user avatar
0 votes
2 answers
2k views

Displaying image on Thymeleaf from List of objects returned via MySQL/Hibernate

I'm attempting to make a portfolio website that I can edit all portfolio items utilizing my own REST api. With that in mind, I have stored 8 images in my database under the Skills table that has a ...
Willie Mangram's user avatar
1 vote
0 answers
237 views

How to Populate a Select Box with another Select with Thymeleaf, JPA and Spring

as the title says i wanna know how to implement that functionality in this project. I'm new at this Spring and Thymeleaf topic using the CrudRepository, Entities, the services for each repository and ...
Banner Gonzales's user avatar
0 votes
1 answer
1k views

Spring Boot, Html button which will add parameters to table in database

I want to make a link or another html element which will add parameters to table in MySQL database using JPA and Thymeleaf. I've made a link which have a good url (create a new parameters in table) ...
kacmak7's user avatar
  • 141
3 votes
1 answer
3k views

A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance when updating

I have a one to many relationship between Project and Requirement entities. Html: <div class="container"> <div class="row"> <div class="col-sm-2"></div> &...
Urban's user avatar
  • 585
0 votes
1 answer
1k views

Returning value from a many to many relationship

Im creating a books database application in SpringBoot. Currently I'm trying to make my Controller to return all fields from the book table. It is connected with an author table with ManyToMany ...
Vinci's user avatar
  • 341
1 vote
0 answers
928 views

Spring Boot and Thymeleaf: Joined Entity Object Returning as null

I am using Spring Boot framework with Hibernate and JPA, and Thymeleaf for the view element. I want to show related data from 2 different entities on the same HTML table on a page. However the object ...
James's user avatar
  • 572
2 votes
1 answer
4k views

How to populate select element in thymeleaf springboot?

I am writing a web application using thymeleaf, springboot. I have one model class with id, name, address, state and district fields. I have 3 tables user table, state table with id, state_name, ...
Pawan Kumar's user avatar
  • 1,601
0 votes
1 answer
125 views

hibernate Mapping error with id

I am new to spring MVC and JPA, hibernate. I am stuck with this error. I want your help friends in my project we are using spring MVC, hibernate, JPA, thymeleaf. I am implementing questioner form this ...
kiran's user avatar
  • 11
0 votes
2 answers
2k views

Spring, thymeleaf, JPA/hibernate, mysql UTF-8 characters persist in db

I have problem with persisting polish PL-pl locale characters in mysql db. I know that is common issue, and out there in the internet is many solution to this. But I cant figure it out. I think I've ...
masterdany88's user avatar
  • 5,311