way to add hints to the repository find method.
Is there a way to do this?
Thanks for the help.
--
View this message in context:
http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/DeltaSpike-Data-Module-Repository-tp4660831.html
Sent from the Apache DeltaSpike Incubator
gt;
>
>
> --
> View this message in context:
> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/DeltaSpike-Data-Module-Repository-tp4660831.html
> Sent from the Apache DeltaSpike Incubator Discussions mailing list archive
> at Nabble.com.
>
--
Best regard,
Daniel Cunha (soro)
database.
>> I cannot find a way to add hints to the repository find method.
>> Is there a way to do this?
>>
>> Thanks for the help.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-deltaspike-incubator-discussions.23161
oting 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 inse
)
public List findAll() {
return super.findAll();
}
--
View this message in context:
http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/DeltaSpike-Data-Module-Repository-tp4660831p4660840.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at
Nabble.com.
method to add like -*
> /**
> * @see org.apache.deltaspike.data.api.EntityRepository#findAll()
> */
> @Override
> @QueryHint("javax.persistence.cache.storeMode",
> CacheRetrieveMode.BYPASS)
> public List findAll() {
> return super.findAll();
> }
; > CacheRetrieveMode.BYPASS);
> >
> > return typedQuery.getResultList();
> >
> > }
> >
> >
> > *I am looking for something easier method to add like -*
> > /**
> > * @see org.apache.deltaspike.data.api.EntityRepository#findAll()
> > */
trieveMode.BYPASS);
> > >
> > > return typedQuery.getResultList();
> > >
> > > }
> > >
> > >
> > > *I am looking for something easier method to add like -*
> > > /**
> > > * @see org.apache.de
ypedQuery typedQuery =
> > > > this.entityManager().createQuery(query);
> > > > typedQuery.setHint("javax.persistence.cache.retrieveMode",
> > > > CacheRetrieveMode.BYPASS);
> > > >
> >
ctEntityRepository implements
> > > > > Deactivatable {
> > > > >
> > > > > public List findAllFromDatabase() {
> > > > >
> > > > > CriteriaQuery query = this.criteriaQuery();
> > > > > Root r
udRepository extends
> > > > > > Serializable>
> > > > > > extends AbstractEntityRepository implements
> > > > > > Deactivatable {
> > > > > >
> > > > > > public List findAllFromDatabase() {
> > >
rovided
> > > > > > by
> > > > > > > the DeltaSpike repository which leads to maintenance issues and
> > > thus
> > > > > > > negates
> > > > > > > a lot of positives that DeltaSpike would provide us.
> >
se
>> > > > > > > framework would have to implement this for all the find
>> methods
>> > > > > provided
>> > > > > > by
>> > > > > > > the Delta
;s findAll.
> >> > > > > > > In the solution you mention all the applications would have
> to
> >> > > > > implement
> >> > > > > > > the
> >> > > > > > > findAll for all the entities.
> >> > > > > > >
> >> >
14 matches
Mail list logo