;s findAll.
> >> > > > > > > In the solution you mention all the applications would have
> to
> >> > > > > implement
> >> > > > > > > the
> >> > > > > > > findAll for all the entities.
> >> > > > > > >
> >> >
se
>> > > > > > > framework would have to implement this for all the find
>> methods
>> > > > > provided
>> > > > > > by
>> > > > > > > the Delta
rovided
> > > > > > by
> > > > > > > the DeltaSpike repository which leads to maintenance issues and
> > > thus
> > > > > > > negates
> > > > > > > a lot of positives that DeltaSpike would provide us.
> >
udRepository extends
> > > > > > Serializable>
> > > > > > extends AbstractEntityRepository implements
> > > > > > Deactivatable {
> > > > > >
> > > > > > public List findAllFromDatabase() {
> > >
ctEntityRepository implements
> > > > > Deactivatable {
> > > > >
> > > > > public List findAllFromDatabase() {
> > > > >
> > > > > CriteriaQuery query = this.criteriaQuery();
> > > > > Root r
ypedQuery typedQuery =
> > > > this.entityManager().createQuery(query);
> > > > typedQuery.setHint("javax.persistence.cache.retrieveMode",
> > > > CacheRetrieveMode.BYPASS);
> > > >
> >
trieveMode.BYPASS);
> > >
> > > return typedQuery.getResultList();
> > >
> > > }
> > >
> > >
> > > *I am looking for something easier method to add like -*
> > > /**
> > > * @see org.apache.de
; > CacheRetrieveMode.BYPASS);
> >
> > return typedQuery.getResultList();
> >
> > }
> >
> >
> > *I am looking for something easier method to add like -*
> > /**
> > * @see org.apache.deltaspike.data.api.EntityRepository#findAll()
> > */
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();
> }
)
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.
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
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
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)
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
14 matches
Mail list logo