## Original Entity
``` java
@Entity
public class MyEntity {
public Long id;
public string name;
public string description;
public string other;
}
```
## Projection interface
Create an interface with the properties that you're interested on.
``` java
public interface SimpleEntity {
Long getId();
string getNome();
}
```
## Query result as projection
In the JPA repository, get de result as the projected interface.
``` java
public interface MyEntityRepo extends JpaRepository<MyEntity, Long> {
SimpleEntity findById(Long id);
}
```
### Writing queries
To get projected results writing queries, you'll need to reference each entitie's property that you're interested on.
``` java
@Query("SELECT e.id as id, e.name as name FROM MyEntity AS e")
List<SimpleEntity> findAllSimplified();
```