Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
No se ha encontrado ninguna propiedad para el tipo Largo

Tengo dos entidades:

 @Data @Entity @Table(name = "car") public class Car { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotBlank @Size(max = 50) private String name; @NotNull @ManyToOne private Category category; }

y

 @Data @Entity @Table(name = "category") public class Category { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotBlank @Size(max = 50) private String name; }

y el CarRepository

 @Repository public interface CarRepository extends PagingAndSortingRepository<Car, Long> { List<Car> findAllByCategoryIdByOrderByNameAsc(Long categoryId); }

Pero el método "findAllByCategoryIdByOrderByNameAsc" está dando error cuando inicio el proyecto de primavera.

 Error: No property by found for type Long! Traversed path: Car.category.id.

¿Es correcta esta búsqueda de "coche" por el Id de la categoría, ordenada por el nombre del "coche"?

Si elimino "ByOrderByNameAsc", entonces funciona ...

Gracias.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!