In the application I am working on, I have several Entity classes. For example:

```
@Entity
public class Person implements Serializable {
    @Column
    private String columnA;

    public String getColumnA() {
        return columnA;
    }

    public void setColumnA(String columnA) {
        this.columnA= columnA;
    }
}

```

I have accompanying Repositories:

```
public interface PersonRepository extends CrudRepository<Person, Long> {
    Person findByPersonID(Long id);
}

```

Then I utilize the repositories like so:

```
@Autowired
private PersonRepository personRepository;

```

I have several Entities (e.g., Person, Status, Training, Benefits, etc.)

I am needing to make a very specialized report query to the database that uses multiple joins across multiple tables. I have the query working in MySQL Workbench.

So, I created a new Repository:

```
@Repository
public interface ReportRepository extends CrudRepository<Report, Long> {
    @Query("SELECT ...")
    List<Report> queryReportData(String columnA, String columnB, String columnC, ...);
}

```

Where Report is just a POJO with the fields I need:

```
public class Report {
    private String columnA;
    private String columnB;
    // etc ...
}
// Getters and Setters here

```

My issue is when I try to use the repository like so:

```
@Autowired
private ReportRepository reportRepository;

```

I get run-time errors:

> 
> creating bean with name 'genController': Unsatisfied dependency expressed through field 'reportRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class com.me.Report
> 
> 
> 

> 
> Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class com.me.Report
> 
> 
> 

> 
> Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.me.Report
> 
> 
> 

Where genController is:

```
@RestController
public class GenController {
}

```

Granted, Report.java is not an actual `@Entity` as it is not "really" in the database.

So, am I going about this completely wrong, or am I kind of on the right path?

What do I need to do in order to get the data I need using my custom, cross table, query?