Re: How to execute a stored procedure as part of a commitChanges?

2016-04-12 Thread Juan Manuel Diaz Lara
Jurgen, your code is great for one dataobject, but how to do it for the entire context automatically ?  Atte. Juan Manuel Díaz Lara On Tuesday, April 12, 2016 2:04 PM, Juan Manuel Diaz Lara wrote: Thanks, I will try it this later, report results.  Atte. Juan Manuel Díaz Lara     On T

Re: How to execute a stored procedure as part of a commitChanges?

2016-04-12 Thread Juan Manuel Diaz Lara
Thanks, I will try it this later, report results.  Atte. Juan Manuel Díaz Lara On Tuesday, April 12, 2016 5:16 AM, "do...@xsinet.co.za" wrote: Hi Juan With regards to your question:  is there some way to get a diff of the failed context and apply that to the new context ? You could t

Re: Does Cayenne 4.0.3M work on JellyBean 4.0?

2016-04-12 Thread Andrus Adamchik
> On Apr 12, 2016, at 3:14 PM, Simon Farner wrote: > >> >> It's possible to get it mostly working now but takes some effort. > Mostly working means? What does not work? And how much effort are we > talking? Are still early in development of the app, so there is still > the possibility to switc

Re: Does Cayenne 4.0.3M work on JellyBean 4.0?

2016-04-12 Thread Simon Farner
Wow rtt is amazing on this list. Thank your for this quick answer > The next version of Android will be though So we are talking Android 7.0 ? That's somewhat unfortunate. > It's possible to get it mostly working now but takes some effort. Mostly working means? What does not work? And how much e

Re: Does Cayenne 4.0.3M work on JellyBean 4.0?

2016-04-12 Thread John Huss
It doesn't work out if the box because Android is not a complete java implementation. The next version of Android will be though. It's possible to get it mostly working now but takes some effort. On Tue, Apr 12, 2016 at 6:48 AM Simon Farner wrote: > Hello everybody > > I built a working ORM setu

Does Cayenne 4.0.3M work on JellyBean 4.0?

2016-04-12 Thread Simon Farner
Hello everybody I built a working ORM setup on my server application. I now would like to clone the project into our Android application, switching the back end to sqlite. We aim to support phones starting from JellyBean 4.0. The gradle project builds without failure, but when I try to create obj

Re: How to execute a stored procedure as part of a commitChanges?

2016-04-12 Thread dollj
Hi Juan With regards to your question: is there some way to get a diff of the failed context and apply that to the new context ? You could try the following: 1. Before context.commitChanges() do something like: DataRow changes = context.currentSnapshot( this ).createDiff ( context.getO

Re: How to execute a stored procedure as part of a commitChanges?

2016-04-12 Thread Andrus Adamchik
I think this is a valid scenario. While most of the time discarding context's objects state on tx failure is appropriate, I guess this is not always the case. Ideally your SQL call should execute inside DataDomainFlushAction.flush(..) between runQueries() and postprocess(). Alas, we don't have

Fetching a list of objects from a list of primary keys

2016-04-12 Thread Hugi Thordarson
Hi all. I have a list of primary keys [3,4,5,etc…] and I’d like to fetch all the corresponding objects in one go. Do I have to expose the primary key of my entity to do this or is there some method like Cayenne.objectForPK() that can accept a list of keys and return multiple objects? Cheers, -