Linked Questions

0 votes
1 answer
4k views

I'm trying to do some basic database operations using a generic repository in Spring Data JPA. However, I keep running into an IllegalArgumentException "Not an managed type: " + whatever class/...
wMattDodd's user avatar
  • 115
3 votes
1 answer
4k views

//generic repo public interface MyGenericRepo extends JpaRepository<GenericEntity,Integer> { } //entity class Place extends GenericEntity { private Event event; } //entity class Event ...
Feroz Mujawar's user avatar
12 votes
1 answer
17k views

Here is the sample Generic Repository implementation which extends the spring PagingAndSortingRepository, @NoRepositoryBean public interface GenericRepository<T, ID extends Serializable> ...
Shams Mali's user avatar
3 votes
3 answers
7k views

I have about 30 tables that I need to fill from an XML file. And I want to use JPA for that purpose. Now I have 30 classes annotated with @Entity, config that scans entities and repositories; Also I ...
Frankie Drake's user avatar
3 votes
2 answers
5k views

We are working on a Restful project with lots of DB tables. Though the operations on the tables are almost same and mainly INSERT/UPDATE/DELETE/FETCH. my questions is: will we have to create a ...
Sudipta Ghosh's user avatar
3 votes
2 answers
28k views

Is there a way to make a generic Spring Data JPA repository handle correctly methods like findAll()? e.g. AnimalRepository<Dog>.findAll return only Dogs, instead of all animals? Or at least, how ...
Cleyton Gonçalves's user avatar
4 votes
2 answers
10k views

I have created two entites (RegularEmployee and ContactEntity) that extends the Employee entity. @Entity @Table(name="employees") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @...
whatspoppin's user avatar
1 vote
1 answer
4k views

I've been searching for a way to do this but can't quite find it. Basically I'd like to make a generic repository I can inject anywhere. I have lots of cruds I need to make in this project and they ...
Livb's user avatar
  • 43
5 votes
1 answer
3k views

In looking at the Query Creation for the Spring Data JPA Repositories, I'm wondering how I would reuse a parameter. For example, how would I name the method if I wanted to do something like: @Query("...
end-user's user avatar
  • 3,027
0 votes
2 answers
5k views

I want something just like this...i know someone will get it what i want public interface PersonneRepo extends JpaRepository<T, Long> { @Query("Select p.name, p.surname, p.age, p.city, p....
Nikki Singh's user avatar
3 votes
2 answers
2k views

I have created an interface like this, @Repository public interface IJpaRepositoryCustom<T> extends JpaRepository<T,Long>{ } And service class @Service public class LOVService<T>{ ...
Kalana Weerarathne's user avatar
0 votes
1 answer
2k views

I have a base entity class BaseDictionary: @Entity @Inheritance public abstract class BaseDictionary { @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.IDENTITY) ...
arman.s's user avatar
2 votes
1 answer
1k views

Reading about using Java Generics in DAO layer, I have a doubt applying this in spring data repositories. I mean, with spring data repositories, you have something like this: public interface ...
fernando1979's user avatar
  • 1,959
0 votes
1 answer
1k views

This is a follow-up question based on Oliver Gierke's suggestion. We have two tables (almost same information) but for some external reasons, cannot use a common single table. I am getting an error ...
patb23's user avatar
  • 397
0 votes
1 answer
1k views

I have a generic interface that extends the JpaRepository, I've overridden some methods and I want to create a new generic method to find records by field name and its value. e.g : @Query("SELECT ...
tomer itzhak's user avatar

15 30 50 per page