My DB is postgres, how can I contribute/replace de PostgresPkGenerator with my
own implementation to genera UUID's as PK's:
public class PcExpressPosUUIDPkGenerator extends PostgresPkGenerator {
public PcExpressPosUUIDPkGenerator(@Inject PostgresAdapter adapter) {
super(adapter);
}
I opened my project with Cayenne Modeler, and accept all.
It fails to migrate correctly inter-datamap references... referecens in same
datamap are ok.
The skeleton for the inter-datamap relationships are shown with empty targets
and details.
Thanks for your great tool.
Atte. Juan Manuel Díaz L
t; template=${basedir}/cgen/subclass.vm"
>
> destDir="src"
>
> outputPattern="*.java"
>
> encoding="UTF-8"
>
> mode="all"
>
> />
>
>
>
> On Fri, Jan 17, 2020 at 6:47 PM Juan Manuel Diaz Lara
> wrote
templates, as it's not that
configurable as server runtime.
We have a task for that [1], but no estimate though.
[1] https://issues.apache.org/jira/browse/CAY-2338
On Fri, Jan 17, 2020 at 9:39 PM Juan Manuel Diaz Lara
wrote:
>
> This is to be get the "comment" of the mapping node
I am using Cayenn 4.1.RC and trying to user custom templates. I created a new
template, an selected in preferences, when generating I choose Advance and
selecte my new template, generations fails with "Unable to find resource ..."
and the template path, but this path does not have my home direct
This is to be get the "comment" of the mapping node of attributes to generate
additional features to _baseClasses. I really need then at run time but I will
be happy if I can get it at generation time.
Thanks.
Atte. Juan Manuel Díaz Lara
I would like to add metadata and use it at runtime to generate automatic UI to
edit entities... metadata like column title, label, java validation tags, etc.
My first thought to use then comments on cayenne 4.1 but I did not was able to
navigate from objAttribute to the comment added en the sche
I would like to enhance code generation with some Hibernate Validation
Annotations written as comments on the modeller.
Thanks for your help.
Atte. Juan Manuel Díaz Lara
The purpose is to use db stored procedures to do the post-processing of my
object graph, something like (seudo-code);
start cayenne transaction
cayenne commitChanges();
call stored procedure/function to post-process (heavy process).
commit cayenne transaction
I would be nice that if st
runtime.performInTransaction(() -> {
// ... do some changes
context.commitChanges();
// ... do more changes
context.commitChanges();
return true;
}); Previous code is an example on "Guide to 4.0 Features".
My questions are:
- What is then persis
I am using 4.0.M5.
The next code used to work in a previous version, but now PCADataDomainProvider
is never called to create my custom DataDomain:
public class ServerModuleWithPostCommitActions implements
org.apache.cayenne.di.Module {
@Override
public void configure(Binder binder) {
Díaz Lara
On Tuesday, March 6, 2018, 9:46:30 AM CST, Maik Musall
wrote:
Hi Juan,
couldn't you do this more easily and reliably with a db trigger?
Maik
> Am 06.03.2018 um 16:11 schrieb Juan Manuel Diaz Lara
> :
>
> Is there any way to call a stored procedure as
Is there any way to call a stored procedure as part of commitChanges ?
I would like to call a stored procedure after flushing my persistent objects
but before the real db commit, for instance, to make some process on the db as
part of committing my objects, but transactionally.
performInTransac
Lara
On Monday, February 12, 2018, 7:06:42 PM CST, Juan Manuel Diaz Lara
wrote:
My code was working on 4.0.M5, but I ca not figure out how to make it work on
B2, I think the problem is that I am not installing my DbAdapterDetector
properly.
package com.ace.dba;
import s
My code was working on 4.0.M5, but I ca not figure out how to make it work on
B2, I think the problem is that I am not installing my DbAdapterDetector
properly.
package com.ace.dba;
import static
org.apache.cayenne.configuration.Constants.SERVER_ADAPTER_DETECTORS_LIST;
import org.apache.cayen
a note here too.
Looks like a bug to me too. Will investigate and file a bug (and
ideally make a fix) if required.
On Wed, Nov 29, 2017 at 9:17 AM, Juan Manuel Diaz Lara
wrote:
> I created a new project, with entities Products -toMany->
> StockcurrentCorporativo, with same results.
. Juan Manuel Díaz Lara
On Tuesday, November 28, 2017, 2:04:43 PM CST, Juan Manuel Diaz Lara
wrote:
I am agree that this kind of query should generate a SQL DISTINCT, but the
fact is that adding a joint()brings only one product on result even the sql
generates 16 rows, so Cayenne is
generates a "distinct" in the query. I'm not sure why it
would be different for you.
-Lon
On Mon, Nov 27, 2017 at 8:45 PM, Juan Manuel Diaz Lara <
jmdia...@yahoo.com.invalid> wrote:
> More details, this code should return only one product entity, but
> produces a r
ze of relationships ?.
Please help.
Atte. Juan Manuel Díaz Lara
On Sunday, November 26, 2017, 8:57:50 PM CST, Juan Manuel Diaz Lara
wrote:
I am using 4.0.M5, previously this query worked as I expected:
ObjectSelect q = ObjectSelect.query(Product.class)
.whe
I am using 4.0.M5, previously this query worked as I expected:
ObjectSelect q = ObjectSelect.query(Product.class)
.where(Product.EXISTENCIAS_CORPORATIVAS.dot(StockCurrentCorporativo.UNITS).gt(0.0))
.and(Product.CODE.like("USBVGA");
Thanks, that was the correct answer. I had no seen thar property before because
my app was client-server.
Atte. Juan Manuel Díaz Lara
On Thursday, October 12, 2017, 3:17:47 PM CDT, Juan Manuel Diaz Lara
wrote:
Yes!!! I will try whitout it and report result. Thanks.
Atte. Juan
Yes!!! I will try whitout it and report result. Thanks.
Atte. Juan Manuel Díaz Lara
On Thursday, October 12, 2017, 1:14:30 PM CDT, Juan Manuel Diaz Lara
wrote:
I devoloped a module to integrate cayenne into apache-tapestry, using cayenne
4.0.M5 and tapestry 5.4.3...
I the module I
I devoloped a module to integrate cayenne into apache-tapestry, using cayenne
4.0.M5 and tapestry 5.4.3...
I the module I create a single ServerRuntime for mi web app, then, on each
request I call serverRuntime.newContext(); to get a new fresh ObjectContext,
but some way I get the same results i
I found that If you map a procedure and you pass a wrong parameter name on
ProcedureCall, Cayenne does not throw an exception, it just pass null to db for
the missing parameters.
This could be a bug or enhancement, but I do not know where to put this
comment, hope someone knows.
Atte. Juan Manu
ow what has
changed instead, which is an entirely different discussion.
mrg
On Thu, Apr 28, 2016 at 10:31 PM, Juan Manuel Diaz Lara <
jmdia...@yahoo.com.invalid> wrote:
> Ok, I was thinking on other frameworks... the simple solution is to
> increment the version field from the app bef
it and ensure a
monotonically increment.
To anyone maybe interested.
Atte. Juan Manuel Díaz Lara
On Thursday, April 28, 2016 5:52 PM, Juan Manuel Diaz Lara
wrote:
I have this simplified scenario where the second commitChanges fails with an
optimistic exception:
s
I have this simplified scenario where the second commitChanges fails with an
optimistic exception:
s = CayenneDao.instance.getByPrimaryKey(StockCurrent.class,
testStockcurrentId);
s.setUnits(s.getUnits()+1));
context.commitChanges();
s.setUnits(s.ge
Actually, I am reviewing the code to hack it, I append a sequence diagram of my
analysis, hotspotting in red the points where cayenne do some actions that
must be done post transaction commit but are actually done before transaction
commits. The sequence diagram shows the scenario where we are
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
f( changes );
Then you should be back to where you started before the attempted commit.
Regards
Jurgen
-Original Message-----
From: Juan Manuel Diaz Lara
Sent: Tuesday, April 12, 2016 4:59 AM
To: user@cayenne.apache.org
Subject: Re: How to execute a stored procedure as part of a commitCha
, 2016 3:21 PM, John Huss wrote:
I think changing Cayenne is the wrong solution here.
The problem is that your commit failed. You have to rollback the context if
you want to keep using it.
On Mon, Apr 11, 2016 at 2:22 PM Juan Manuel Diaz Lara
wrote:
> Calling rollbackChanges will lost
() or just create a new context and
start over.
On Mon, Apr 11, 2016 at 10:31 AM Juan Manuel Diaz Lara
wrote:
>
>
> I am using 4.0.M3.
> I used the following solution, but the problem is that after
> commitChanges() the dataobjetcs are set to PersistenceState.COMMITED, if
> the stor
s://cayenne.apache.org/docs/4.0/cayenne-guide/persistent-objects-objectcontext.html#transactions
On Mon, Apr 11, 2016 at 10:54 AM, Juan Manuel Diaz Lara
wrote:
>
>
> I have a dataobjet graph with some changes, and a db stored procedure that
>should run after this changes are in the d
I have a dataobjet graph with some changes, and a db stored procedure that
should run after this changes are in the db, but must run in the same
transaction because it make some more changes to other data, this changes can
fail so I want the commitChanges fail if the stored procedure fails.
I am using Cayenne 4.0.M3.
I want to build an graph of persistent objects using the api for many targets,
but I get the following trace:
Exception in thread "main" java.lang.NullPointerException
at
org.apache.cayenne.CayenneDataObject.addToManyTarget(CayenneDataObject.java:248)
at
com.a
Atte. Juan Manuel Díaz Lara
On Friday, April 8, 2016 6:27 PM, Juan Manuel Diaz Lara
wrote:
I am using Cayenne 4.0.M3.
I want to build an graph of persistent objects using the api for many targets,
but I get the following trace:
Exception in thread "
I am using Cayenne 4.0.M3.
I want to build an graph of persistent objects using the api for many targets,
but I get the following trace:
Exception in thread "main" java.lang.NullPointerException
at
org.apache.cayenne.CayenneDataObject.addToManyTarget(CayenneDataObject.java:248)
at
com.a
37 matches
Mail list logo