You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Tibor Digana (JIRA)" <ji...@apache.org> on 2016/06/24 09:04:16 UTC
[jira] [Created] (DELTASPIKE-1177) [Deltaspike Data] Regoznize
Entity Type by method returned type if @Repository.forEntity is set to
default
Tibor Digana created DELTASPIKE-1177:
----------------------------------------
Summary: [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:java}
@Repository
public interface Java8Repository {
MyEntity findByCourse(@NotNull String courseName);
AnotherEntity findByCustomer(@NotNull String customerName);
@Query("........")
Object[] findMultipleEntityTypes(@NotNull String attribute);
}
{code:java}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)