[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15394821#comment-15394821
 ] 

John D. Ament commented on DELTASPIKE-1177:
-------------------------------------------

Hi [~tibor17] would be great to see this as a contribution.  Personally, I feel 
it breaks the repository pattern which is intended to be one entity per.

> [Deltaspike Data] Regoznize Entity Type by method returned type if 
> @Repository.forEntity is set to default
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1177
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1177
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: Data-Module
>    Affects Versions: 1.7.0
>            Reporter: Tibor Digana
>
> I want to use Deltaspike Data Repo as a Service because it is simplistic and 
> not DAO.
> Since of service operates over multiple entities I want the extension to 
> recognize the Entity type dynamically by method return type.
> Notice the example does not implement _EntityRepository_ and therefore the 
> only return type should be checked.
> {code}
> @Repository
> public interface Java8Repository {
>   MyEntity findByCourse(@NotNull String courseName);
>   AnotherEntity findByCustomer(@NotNull String customerName);
>   @Query("........")
>   Object[] findMultipleEntityTypes(@NotNull String attribute);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to