[jira] [Commented] (DELTASPIKE-700) Add #tableName() to AbstractEntityRepository

2015-06-11 Thread Thomas Hug (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14581731#comment-14581731 ] Thomas Hug commented on DELTASPIKE-700: --- Put some comments on the PR, looks good

[jira] [Resolved] (DELTASPIKE-700) Add #tableName() to AbstractEntityRepository

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) resolved DELTASPIKE-700. Resolution: Fixed > Add #tableName() to AbstractEntityRepository > -

[jira] [Created] (DELTASPIKE-923) Add #entityName() to AbstractEntityRepository

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
Daniel Cunha (soro) created DELTASPIKE-923: -- Summary: Add #entityName() to AbstractEntityRepository Key: DELTASPIKE-923 URL: https://issues.apache.org/jira/browse/DELTASPIKE-923 Project: Delta

DeltaSpike Data Module Repository

2015-06-11 Thread akm
We are piloting DeltaSpike Data Module in our enterprise. Our requirements are to add a query hint to bypass cache for the find methods since most of our applications need to get the latest data from the database as the records may be directly inserted or updated in the database. I cannot find a w

[jira] [Updated] (DELTASPIKE-923) Add #entityName() to AbstractEntityRepository

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) updated DELTASPIKE-923: --- Affects Version/s: 1.4.0 > Add #entityName() to AbstractEntityRepository >

[jira] [Updated] (DELTASPIKE-923) Add #entityName() to AbstractEntityRepository

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) updated DELTASPIKE-923: --- Component/s: Data-Module > Add #entityName() to AbstractEntityRepository >

[jira] [Updated] (DELTASPIKE-700) Add #tableName() to AbstractEntityRepository

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) updated DELTASPIKE-700: --- Fix Version/s: 1.4.1 > Add #tableName() to AbstractEntityRepository >

Re: DeltaSpike Data Module Repository

2015-06-11 Thread Daniel Cunha
Hi Akm, Maybe, you can do something like: ``` public abstract class PersonRepository extends AbstractEntityRepository { public Person findBySSN(String ssn) { return typedQuery("select p from Person p where p.ssn = ?1") .setParameter(1, ssn) .setHin

Re: DeltaSpike Data Module Repository

2015-06-11 Thread Daniel Cunha
Ops, I wanted to say: NativeNamedQuery and the method should return a list, not a entity. I used a sample of the documentation and add the hint to show my example. (I'm fixing it in documentation now) On Thu, Jun 11, 2015 at 11:57 AM, Daniel Cunha wrote: > Hi Akm, > > Maybe, you can do somethin

Re: DeltaSpike Data Module Repository

2015-06-11 Thread Daniel Cunha
you also can do: http://deltaspike.apache.org/documentation/data.html#QueryOptions21 On Thu, Jun 11, 2015 at 12:02 PM, Daniel Cunha wrote: > Ops, > > I wanted to say: NativeNamedQuery and the method should return a list, not > a entity. > I used a sample of the documentation and add the hint to

Re: DeltaSpike Data Module Repository

2015-06-11 Thread akm
Thanks for the reply. We are creating a framework that all our enterprise applications will be using; so I am looking for a generic solution that I can add in a abstract class that then all entities can use. Basically looking for something like just adding a hint to the current AbstractEntityRepo

Re: DeltaSpike Data Module Repository

2015-06-11 Thread Daniel Cunha
Hmm.. so, that's should work: ``` @Repository public interface SimpleRepository extends EntityRepository { @Override @Query(hints = {@QueryHint(name = "javax.persistence.cache.storeMode", value = BYPASS)}) List findAll(); } ``` On Thu, Jun 11, 2015 at 11:53 AM, akm wrote: > Thanks

[jira] [Resolved] (DELTASPIKE-923) Add #entityName() to AbstractEntityRepository

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) resolved DELTASPIKE-923. Resolution: Fixed Fix Version/s: 1.4.1 > Add #entityName() to Abs

[jira] [Created] (DELTASPIKE-924) Adjust The AbstractEntityRepository Class secion.

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
Daniel Cunha (soro) created DELTASPIKE-924: -- Summary: Adjust The AbstractEntityRepository Class secion. Key: DELTASPIKE-924 URL: https://issues.apache.org/jira/browse/DELTASPIKE-924 Project: D

[jira] [Resolved] (DELTASPIKE-924) Adjust The AbstractEntityRepository Class secion.

2015-06-11 Thread Daniel Cunha (soro) (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) resolved DELTASPIKE-924. Resolution: Fixed > Adjust The AbstractEntityRepository Class secion. >

Re: DeltaSpike Data Module Repository

2015-06-11 Thread Thomas Hug
Using the @Query(hints...) is the place to set the hints with DS Data. Unfortunately (hope my memory isn't wrong) this currently doesn't work with a method expression. As soon as there's a @Query it's not considered a method expression anymore. Should not be too difficult to change - and should be

Re: DeltaSpike Data Module Repository

2015-06-11 Thread Daniel Cunha
Thomas, you're right, not work. I changed and works now[1], but I don't know if this is the better way to fix it. https://github.com/danielsoro/deltaspike/commit/bb02f14731e9c7fd5d20c255bae2a2033617a9b8 On Thu, Jun 11, 2015 at 4:11 PM, Thomas Hug wrote: > Using the @Query(hints...) is the plac