Re: Redacting db user name and password from XML

2018-01-19 Thread Pascal Robert
OPERTY, "password")) >> .build(); >> >> I will add some information to logs, so at least it wouldn't be >> surprising as it is now. >> But maybe we should change this to enable override of separate properties. >> >> On Thu, Jan 18, 2018

Re: Redacting db user name and password from XML

2018-01-17 Thread Pascal Robert
cess.dbsync.SkipSchemaUpdateStrategy"> > > > > > > > The property isn't really used anywhere in my code, but > if I take it out I get an error from the modeler saying that there are no > param

Re: Redacting db user name and password from XML

2018-01-17 Thread Pascal Robert
sword", "DB_PASSWORD"); > > in startup script: > > export DB_PASSWORD=root > export DB_PASSWORD=secret > > java -jar my.jar # no password in the Java process sig > > Andrus > > [1] > http://bootique.io/docs/0/bootique-docs/index.html#cha

Re: Redacting db user name and password from XML

2018-01-16 Thread Pascal Robert
Do -Dcayenne.jdbc.username really work? I’m trying to use that (so that the password is not stored in Git), and the runtime is still using the login information from the XML file. Cayenne 4.1.M1. ServerRuntime mysqlRuntime = ServerRuntime.builder().addConfig("cayenne-mysql.xml").build(); > Le

Re: Object not cached/SELECT on each access

2018-01-10 Thread Pascal Robert
e when this is happening, or is it happening > all the time? All the time. > > On Wed, Jan 10, 2018 at 6:35 AM Pascal Robert wrote: > >> Hi, >> >> I’m trying to find out why it takes between 200 and 500 ms to convert an >> entity coming from FileMaker and comm

Object not cached/SELECT on each access

2018-01-10 Thread Pascal Robert
Hi, I’m trying to find out why it takes between 200 and 500 ms to convert an entity coming from FileMaker and commit the « new » entity to MySQL. Found out that every time I access a property of the fetched object, Cayenne does a SELECT query. Example: try(ResultBatchIterator batch = Objec

Re: Bootique, Cayenne and production

2017-06-14 Thread Pascal Robert
ne, then use > Cayenne for DataSource management, and remove it from Bootique. > > Andrus > > [1] https://lists.apache.org/thread.html/80a226b35e9492c6788b155708f52a > fb57ddbc90f65e890c41b2f1ad@%3Cuser.cayenne.apache.org%3E > > On Jun 13, 2017, at 7:20 PM, Pascal Robert wrote:

Re: Bootique, Cayenne and production

2017-06-14 Thread Pascal Robert
The problem was that my Bootique app was linked with the LinkRest module, which I don’t use. Removed the dependency and now everything works fine. > Le 13 juin 2017 à 15:02, Pascal Robert a écrit : > > This is what I tried. Empty config.yml, keeping everything in the Cayenne

Re: Bootique, Cayenne and production

2017-06-13 Thread Pascal Robert
c6788b155708f52afb57ddbc90f65e890c41b2f1ad@%3Cuser.cayenne.apache.org%3E > >> On Jun 13, 2017, at 7:20 PM, Pascal Robert wrote: >> >> Talked too fast. If I keep the JDBC part in config.yml, it tries to connect >> to that datasource when the Bootique app launch. >> >>> Le 1

Re: Bootique, Cayenne and production

2017-06-13 Thread Pascal Robert
Talked too fast. If I keep the JDBC part in config.yml, it tries to connect to that datasource when the Bootique app launch. > Le 12 juin 2017 à 12:24, Pascal Robert a écrit : > > Ok, it is working if I remove the Cayenne tree in config.yml, while keeping > the JDBC part, o

Re: Bootique, Cayenne and production

2017-06-12 Thread Pascal Robert
"cayenne.jdbc.driver", "com.mysql.Driver") >.put("cayenne.jdbc.url", "jdbc:mysql://127.0.0.1:3306/"); >}) >.build(); > > [1] > http://cayenne.apache.org/docs/4.0/api/org/apache/cayenne/configuration/server/PropertyData

Re: Bootique, Cayenne and production

2017-06-12 Thread Pascal Robert
he -D properties will work. > > Or did I misunderstand your use case? I was hoping to have a solution that would work on both Bootique and non-Bootique apps :-) > > Andrus > > >> On Jun 12, 2017, at 5:31 PM, Pascal Robert wrote: >> >> Tri

Re: Bootique, Cayenne and production

2017-06-12 Thread Pascal Robert
put("cayenne.jdbc.driver", "com.mysql.Driver") >.put("cayenne.jdbc.url", "jdbc:mysql://127.0.0.1:3306/"); >}) >.build(); > > [1] > http://cayenne.apache.org/docs/4.0/api/org/apache/cayenne/configuration/server/Property

Re: Bootique, Cayenne and production

2017-06-12 Thread Pascal Robert
ootique apps? > Andrus > >> On Jun 9, 2017, at 6:14 PM, Pascal Robert wrote: >> >> Hi, >> >> I’m deploying my first Bootique app, which use Cayenne. In my config.yml >> file, I set the datasource like this: >> >> jdbc: >> mysql: >

Bootique, Cayenne and production

2017-06-09 Thread Pascal Robert
Hi, I’m deploying my first Bootique app, which use Cayenne. In my config.yml file, I set the datasource like this: jdbc: mysql: driverClassName: com.mysql.jdbc.Driver url: "jdbc:mysql://10.6.xx.xx:3306/filemaker?connectTimeout=0&autoReconnect=true" initialSize: 1 username: xxx

Sharing data model?

2017-06-05 Thread Pascal Robert
Hi, What is the best way to share a data model in multiple apps? Local Maven dependency?

Re: Best method to fetch a lot of objects

2017-05-24 Thread Pascal Robert
> Le 24 mai 2017 à 03:34, Andrus Adamchik a écrit : > > >> On May 23, 2017, at 3:02 PM, Pascal Robert wrote: >> >>> >>> Do all your MySQL entities contain an ObjAttribute for their PK? >> >> In fact, the source is FileMaker, and even i

Re: Best method to fetch a lot of objects

2017-05-23 Thread Pascal Robert
te for their PK? In fact, the source is FileMaker, and even if the field is listed as a number with autofill, that stupid database still allows NULL or non-number values... > > Andrus > >> On May 19, 2017, at 5:25 PM, Pascal Robert wrote: >> >> So far, so good. But I’

Re: Best method to fetch a lot of objects

2017-05-19 Thread Pascal Robert
or 100 or 1000 (whatever number feels good to you) in that second >> DataContext and then commit them, throw away that DataContext and create a >> new one. Repeat. This should keep your memory usage fairly constant and >> allow you to process arbitrarily large record sizes. >&

Best method to fetch a lot of objects

2017-05-19 Thread Pascal Robert
Hi, I’m still in my FileMaker -> MySQL migration project. This time, I want to migrate a FileMaker table who have 445 244 records in it. If I fetch everything into an object entity for each row, I’m getting a Java heap space problem, which is somewhat expected by the size of the result set. If

Re: Duplicate pk when inserting into an empty table

2017-05-09 Thread Pascal Robert
of 3.1. No big need so far, but if we are going to convert the GUI of the FileMaker database, I might use Cayenne more. And I’m using Bootique too :-) > Andrus > >> On May 5, 2017, at 5:16 PM, Pascal Robert wrote: >> >> Forget that email. I commented out two other calls t

Re: Duplicate pk when inserting into an empty table

2017-05-05 Thread Pascal Robert
Forget that email. I commented out two other calls to context.commitChanges() in another block, but I was still inserting objects. > Le 5 mai 2017 à 10:10, Pascal Robert a écrit : > > Hi, > > I’m using Cayenne 3.1.1 (moving from EOF) for a small project: migration data >

Duplicate pk when inserting into an empty table

2017-05-05 Thread Pascal Robert
Hi, I’m using Cayenne 3.1.1 (moving from EOF) for a small project: migration data from FileMaker to MySQL. I have one model with two data maps and two data nodes, one for FileMaker, the other for MySQL. Everything works fine, except one thing: java.sql.BatchUpdateException: Duplicate entry

Re: basic tutorial

2012-12-22 Thread Pascal Robert
So you should avoid using Alfresco :-) > In fact I would argue that any system that requires you to edit xml by hand > is fundamentally broken (I"m looking at you JPA). XML is meant for machines > not humans, and if you develop an xml dialect to represent something you've > only started your work.

Re: Add ActiveRecord support to Cayenne

2012-12-18 Thread Pascal Robert
Le 2012-12-18 à 15:08, emeka okafor a écrit : > Coming from EOF? I think those static helper classes are missing but it is > not that bad either. They were not part of the regular EOF stuff, they started as EOGenerator templates, and have been standard with WOLips (with Velocity templates) si

Re: Replacing EOF with Cayenne

2012-01-23 Thread Pascal Robert
And https://github.com/projectwonder/wonder/tree/master/Frameworks/Misc/ERCayenne > http://wiki.wocommunity.org/display/WO/Alternative+Technologies-Cayenne > >> I remember reading somewhere that it was possible to replace EOF with >> Cayenne while still using the higher levels of WebObjects for

Re: Replacing EOF with Cayenne

2012-01-23 Thread Pascal Robert
http://wiki.wocommunity.org/display/WO/Alternative+Technologies-Cayenne > I remember reading somewhere that it was possible to replace EOF with Cayenne > while still using the higher levels of WebObjects for HTML generation. But > now I can't find where I came across that. Does anyone have any h

Re: Cayenne comparison to EOF / WebObjects

2011-12-06 Thread Pascal Robert
Le 2011-12-06 à 15:06, John Huss a écrit : > On Tue, Dec 6, 2011 at 1:22 PM, Pascal Robert wrote: > >> Hi John, >> >> Enum Attributes is also supported by EOF, have a look at the javaEnum from >> Wonder. >> >> Also, do you think the Project Wonder

Re: Cayenne comparison to EOF / WebObjects

2011-12-06 Thread Pascal Robert
Hi John, Enum Attributes is also supported by EOF, have a look at the javaEnum from Wonder. Also, do you think the Project Wonder Veogen templates could be rewritten to make calls to Cayenne instead of EOF? For example, having the createEntityName method to create a new "EO"? Might be a soluti

Re: Cayenne comparison to EOF / WebObjects

2011-12-06 Thread Pascal Robert
> ... > Entity Templates: I suspect the templating support in Cayenne is > better, although it's been a long time since I worked with EOF > templating. Cayenne has the ability to throw an arbitrary helper > class into the template namespace using vppconfig. I don't remember > how I dealt with s