First glance at that API looks real nice, I'm going to check this out, thanks :)
- hugi
> On 11 Sep 2020, at 07:06, Andrus Adamchik wrote:
>
> 4.2 for the first time exposes generated SQL as an AST, so tweaking it has
> become much easier. This is the feature that made possible to support
>
4.2 for the first time exposes generated SQL as an AST, so tweaking it has
become much easier. This is the feature that made possible to support
geospatial and JSON types.
Nikita, please correct me if I am wrong with the following instructions (as
this API is still in flux). So.. To customize p
Thanks John, not a bad idea.
I'd prefer it if the current method ports though (since I'd have to create
triggers for something like 200 columns). But if that isn't possible we might
consider this.
- hugi
> On 8 Sep 2020, at 20:33, John Huss wrote:
>
> Since you are already at the DB level
Since you are already at the DB level (outside of cayenne) making this
change, I would just use a BEFORE UPDATE row-level trigger in Postgres. You
can change the value there.
Something like this would work:
CREATE OR REPLACE FUNCTION company_default()
RETURNS trigger AS $$
BEGIN
Working with old DB designs really results in the weirdest questions…
So… I've been working around a design problem in a customer DB by using my own
BatchTranslatorFactory. The functionality was that if a column is called
"company", every update wraps the column's new value in a coalesce functio
; --
> View this message in context: http://cayenne.195.n3.nabble.
> com/4-0M4-After-Updating-to-M4-Modeler-Wants-Me-To-Drop-
> All-My-Tables-When-Migrating-DB-Schema-tp4028339.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
yenne.195.n3.nabble.com/4-0M4-After-Updating-to-M4-Modeler-Wants-Me-To-Drop-All-My-Tables-When-Migrating-DB-Schema-tp4028339.html
Sent from the Cayenne - User mailing list archive at Nabble.com.
gt; String using a JPQL-like object query language, so you forfeit the type
>>> safety of SelectQuery. Still it is a much better abstraction then
>>> SQLTemplate for instance. (And its integration into SelectQuery is on the
>>> agenda).
>>>
>>> Andrus
&g
t 31, 2014, at 1:38 AM, Mark Stobbe
>> wrote:
>> >
>> > @Andrus, I see. Good to know how to do this in Cayenne.
>> >
>> > @Michael, You are right. It makes more sense to let the database do the
>> calculations. It prevents the race conditions when u
chael, You are right. It makes more sense to let the database do the
> calculations. It prevents the race conditions when updating and ensures
> totals to be correct.
> > My problem with the solution is just the integration into Cayenne.
> > Do you use some extra classes to keep th
Hello Hugi;
You should be able to use EJBQL for this purpose as well. Here is a
(nicely re-formatted) example;
SELECT
DISTINCT ur.user.nickname
FROM
UserRating ur
WHERE
ur.user.active=true
AND ur.active=true
Have a go and see if it fits your needs.
As Andrus has pointe
On 31/10/2014 8:58pm, Hugi Thordarson wrote:
> Once again, I’m looking into migrating to Cayenne from EOF :). One question
> though: Our code depends heavily on raw row fetching (data rows) that
> traverses relationships. I haven’t looked much at the Cayenne code, but do
> you believe adding sup
gt; @Andrus, I see. Good to know how to do this in Cayenne.
>>
>> @Michael, You are right. It makes more sense to let the database do the
>> calculations. It prevents the race conditions when updating and ensures
>> totals to be correct.
>> My problem with the soluti
s in Cayenne.
>
> @Michael, You are right. It makes more sense to let the database do the
> calculations. It prevents the race conditions when updating and ensures
> totals to be correct.
> My problem with the solution is just the integration into Cayenne.
> Do you use some extra
w to do this in Cayenne.
>
> @Michael, You are right. It makes more sense to let the database do the
> calculations. It prevents the race conditions when updating and ensures
> totals to be correct.
> My problem with the solution is just the integration into Cayenne.
> Do you use some e
@Andrus, I see. Good to know how to do this in Cayenne.
@Michael, You are right. It makes more sense to let the database do the
calculations. It prevents the race conditions when updating and ensures totals
to be correct.
My problem with the solution is just the integration into Cayenne.
Do you
The utilities I mentioned also do SUM, AVG, MIN, and MAX ...
On Thu, Oct 30, 2014 at 12:35 PM, Mark Stobbe wrote:
> Oh, I also have the same problem with total cost with different
> currencies...
>
> On Thu, Oct 30, 2014 at 5:09 PM, Mark Stobbe wrote:
>
>> Hi Michael,
>>
>> I would like to disp
Hi Mark,
In general I don't like storing data that is easily calculated from
the DB itself. (Although I've made exceptions when it was
computationally expensive and impractical to do the calculation.)
Some options you could try:
* Fetch a fresh order and then: order.getPackages().size().
* Fetc
etween multiple processes updating the same
order (or fetch and update Order object, if you don't expect this to happen).
Andrus
> On Oct 30, 2014, at 7:09 PM, Mark Stobbe wrote:
>
> Hi Michael,
>
> I would like to display the count in a table for a whole bunch of orders.
Oh, I also have the same problem with total cost with different
currencies...
On Thu, Oct 30, 2014 at 5:09 PM, Mark Stobbe wrote:
> Hi Michael,
>
> I would like to display the count in a table for a whole bunch of orders.
> In theory I could use a "group by"-query to get the numbers I need and
>
Hi Michael,
I would like to display the count in a table for a whole bunch of orders.
In theory I could use a "group by"-query to get the numbers I need and with
proper configured indices this should be fairly quick, I guess.
Is there a more transparent way of doing things, e.g. using lifecycle
l
Hi Mark,
Is there a performance reason why you don't just do a count on the
packages that match the order?
mrg
On Thu, Oct 30, 2014 at 11:00 AM, Mark Stobbe wrote:
> Hi all,
>
> I was wondering what is the best way to update totals in a multi-user
> environment. For example, let's say we have
Hi all,
I was wondering what is the best way to update totals in a multi-user
environment. For example, let's say we have an Order which can have one or
more Packages associated and we want to maintain a total package count on
the Order entity. How would you update this value when the user has the
Hi all.
The subject says it all, really. Do I have any way to automatically update a
flattened relationship when one of the relationships it depends on is updated?
To clarify, let's say I have the following schema: Employee <<> Department
<<> Company. "Company" has a flattened relations
Hi Eric,
It's been a while since I've upgraded from 1.x. Cayenne 2.x should be
API compatible with 1.2, save for the new apache package names. The
changes from 2.x to 3.x were mostly backward compatible. If you
wanted to, you could upgrade in two steps, using 2.x to make sure you
got all the ob
We have been using 1.x happily for years and now finally have a reason to
upgrade: our need for embedded database (e.g., H2) support. Seems like
createAndRegisterNewObject is deprecated. I assume we are supposed to use one
or another version of newObject() instead. Is that right? What else shoul
that you are populating, into datacontext.
>>
>> Check ur this.getPerfil(objid), the object that you are updating must be
>> created into context or by a query
>> SelectQuery q=new SelectQuery(this.queryClass);
>> List data = ctx.performQuery(q);
>>
>>
populating, into datacontext.
>
> Check ur this.getPerfil(objid), the object that you are updating must be
> created into context or by a query
> SelectQuery q=new SelectQuery(this.queryClass);
> List data = ctx.performQuery(q);
>
> where data is a List of queryClass object
this.datacontext.commitChanges(); is correct
I fear u didn't create the object that you are populating, into datacontext.
Check ur this.getPerfil(objid), the object that you are updating must be
created into context or by a query
SelectQuery q=new SelectQuery(this.queryClass);
List
On Jul 22, 2009, at 1:01 PM, Juan Toro Marty wrote:
Perfiles perfil = this.getPerfil(objid);//with this i retrieve an
object Perfil. then...
perfil.setName = name;
perfil.setAge = age;
etc...
this.datacontext.commitChanges();
assuming 'perfil' is created in the same 'datacontext' as
'th
Can anybody helpme teachme any way to make an update... i am using the
following way:
Perfiles perfil = this.getPerfil(objid);//with this i retrieve an
object Perfil. then...
perfil.setName = name;
perfil.setAge = age;
etc...
this.datacontext.commitChanges();
but nothing happens...
is this th
email from your system. Thank
you.
-Original Message-
From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
Sent: Tuesday, February 17, 2009 3:01 PM
To: user@cayenne.apache.org
Subject: Re: Updating DataMap through ROP client
Hi again,
I've done some surfing through the
or use is prohibited. If you received this email in error,
> please notify the sender and delete this email from your system. Thank
> you.
>
>
> -Original Message-
> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
> Sent: Tuesday, February 17, 2009 12:21 PM
&g
d. If you received this email in error,
please notify the sender and delete this email from your system. Thank
you.
-Original Message-
From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
Sent: Tuesday, February 17, 2009 12:21 PM
To: user@cayenne.apache.org
Subject: Re: Updating Da
your system. Thank
> you.
>
>
> -Original Message-
> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
> Sent: Monday, February 16, 2009 3:15 PM
> To: user@cayenne.apache.org
> Subject: Re: Updating DataMap through ROP client
>
> I don't know deta
movsky.and...@gmail.com]
Sent: Monday, February 16, 2009 3:15 PM
To: user@cayenne.apache.org
Subject: Re: Updating DataMap through ROP client
I don't know details of Hessian, but I don't think HessianServlet caches
any
data. Have you tried simply clearing client context's cache?
2009/2
azumovsky [mailto:razumovsky.and...@gmail.com]
> Sent: Sunday, February 15, 2009 1:10 PM
> To: user@cayenne.apache.org
> Subject: Re: Updating DataMap through ROP client
>
> Hi Zissis,
>
> DbEntities are not being sent to client (and DataMap is sent trimmed).
> So I
> don&
[mailto:razumovsky.and...@gmail.com]
Sent: Sunday, February 15, 2009 1:10 PM
To: user@cayenne.apache.org
Subject: Re: Updating DataMap through ROP client
Hi Zissis,
DbEntities are not being sent to client (and DataMap is sent trimmed).
So I
don't think you can perform DataMap changes from client. W
We have an ROP client that acts as a modeler for our runtime
application. Is there any way to modify a DataMap via an ROP client
layer, synchronize the DB schema like I would do using
ExecutingMergerContext at the server layer and then clear the server and
client object caches without dropping the
Hi Zissis,
DbEntities are not being sent to client (and DataMap is sent trimmed). So I
don't think you can perform DataMap changes from client. What I would try to
do is to write a custom query which performs your operations and the fire it
from the client. I'm not sure this will work though.
Reg
We have an ROP client that acts as a modeler for our runtime
application. Is there any way to modify a DataMap via an ROP client
layer, synchronize the DB schema like I would do using
ExecutingMergerContext at the server layer and then clear the server and
client object caches without dropping the
41 matches
Mail list logo