Re: cayenne library changes log level in struts2

2013-12-03 Thread Christian Grobmeier
On 3 Dec 2013, at 15:59, Mike Kienenberger wrote: On Tue, Dec 3, 2013 at 9:43 AM, Christian Grobmeier wrote: With slf4j/log4j2 you can choose your logging api at your own will too. Personally I consider Commons Logging a risk and would not add it into my projects today. Its not well

Re: cayenne library changes log level in struts2

2013-12-03 Thread Christian Grobmeier
On 3 Dec 2013, at 16:14, Mike Kienenberger wrote: On Tue, Dec 3, 2013 at 10:01 AM, Andrus Adamchik wrote: Ideally I’d love to have zero dependency on a third-party logging framework. So that probably means using j.u.l and let the users bridge that as they want. Wonder if we’ll make everyone’s

Re: cayenne library changes log level in struts2

2013-12-03 Thread Christian Grobmeier
other frameworks will most likely not look that much into Commons Logging. But well, I am biased on that. On Tue, Dec 3, 2013 at 9:30 AM, Christian Grobmeier wrote: On 3 Dec 2013, at 14:52, Mike Kienenberger wrote: Everyone has their favorite logger. The commons logging api is support

Re: cayenne library changes log level in struts2

2013-12-03 Thread Christian Grobmeier
mmons Logging came into play. I would have understood slf4j (even when I prefer log4j2) On Tue, Dec 3, 2013 at 8:45 AM, Christian Grobmeier wrote: Commons Logging?? Have you considered Log4j 2? On 3 Dec 2013, at 14:30, Andrus Adamchik wrote: Nah, you are talking about very old Cayenne.

Re: cayenne library changes log level in struts2

2013-12-03 Thread Christian Grobmeier
Dec 3, 2013, at 4:26 PM, Christian Grobmeier wrote: When I recall correctly Cayenne takes it's own log4j.properties when nothing is given. You could try to create your own log4j confiugraiton like that: log4j.logger.org.apache.cayenne=INFO log4j.category.org.apache.struts2

Re: cayenne library changes log level in struts2

2013-12-03 Thread Christian Grobmeier
When I recall correctly Cayenne takes it's own log4j.properties when nothing is given. You could try to create your own log4j confiugraiton like that: log4j.logger.org.apache.cayenne=INFO log4j.category.org.apache.struts2=INFO log4j.category.org.apache=INFO log4j.category.com.opensymphony.xwork

Re: Scale out

2013-06-03 Thread Christian Grobmeier
On Sat, Jun 1, 2013 at 8:02 AM, Andrus Adamchik wrote: > > On Jun 1, 2013, at 7:34 AM, Christian Grobmeier wrote: > >>> >>> what about doing something virtual with a Connect session or eqquivalent. >>> >>> >> Thanks Malcom! I am afraid I

Re: Scale out

2013-05-31 Thread Christian Grobmeier
hik > wrote: > > > > > On May 31, 2013, at 3:21 PM, Christian Grobmeier > wrote: > > > >> Thanks all for your comments and the ideas > >> Looks like it is not an easy task and I am glad I asked so early. I > >> will most likely not check terrac

Re: Scale out

2013-05-31 Thread Christian Grobmeier
On Fri, May 31, 2013 at 2:38 PM, Andrus Adamchik wrote: > > On May 31, 2013, at 3:21 PM, Christian Grobmeier > wrote: > > > Thanks all for your comments and the ideas > > Looks like it is not an easy task and I am glad I asked so early. I > > will most likely not

Re: Scale out

2013-05-31 Thread Christian Grobmeier
y 30, 2013 at 11:21 AM, Mike Kienenberger >> wrote: >> >>> And be careful not to overdo it. I made that mistake in my first >>> ecommerce app. >>> >>> In hindsight, it was sufficient to make sure the data was refreshed at >>> the beginning

Scale out

2013-05-29 Thread Christian Grobmeier
Hi all, my app runs well with Cayenne and gets good feedback. With growing data, I need to start thinking about my scaling options. I know about ROP, but I would like to use some kind of "shared caching" or so. Like: DB SERVER --> App + Cayenne 1 +> App + Cayenne 2 No

Re: CommonsJdbcEventLogger does not print the queries

2012-01-24 Thread Christian Grobmeier
Hello Wernke (sorry for misspelling your name in my first response), On Tue, Jan 24, 2012 at 12:23 PM, Wernke zur Borg wrote: > Class JdbcAdapter has this: > > @Inject >     protected JdbcEventLogger logger; I have not done this before, but in most cases of DI you need to have appropriate setter

Re: CommonsJdbcEventLogger does not print the queries

2012-01-24 Thread Christian Grobmeier
Hello Werner, On Tue, Jan 24, 2012 at 9:35 AM, Wernke zur Borg wrote: > I switched from QueryLogger to CommonsJdbcEventLogger but now I can't > get it to print the detailed queries any more. > > I am trying to debug a problem with my code and I set: > > log4j.logger.org.apache.cayenne.log.Commons

Re: Cayenne "official" twitter

2012-01-23 Thread Christian Grobmeier
Great stuff. Have added you guys On Mon, Jan 23, 2012 at 3:41 PM, Andrus Adamchik wrote: > Some time ago the Cayenne PMC started a twitter account (we should probably > add that to the site).. Please follow it here: > >   http://twitter.com/ApacheCayenne > > It shouldn't be very high volume, but

Re: Getting Current Connection from ObjectContext

2011-11-14 Thread Christian Grobmeier
John, On Mon, Nov 14, 2011 at 4:23 PM, John Huss wrote: > I have a similar function.  Would there be any interest in adding something > like this to Cayenne? it is probably best if you would explain more in detail what exactly you would like to add to cayenne on the d...@cayenne.apache.org maili

Re: Selecting relationships without restriction

2011-11-06 Thread Christian Grobmeier
oric. > > The first option has the advantage that it doesn't load all prices into > memory, but it doesn't return unsaved current prices. And if the result is > cached, it doesn't reflect any changes. > > Joe > > On Nov 6, 2011, at 8:04 AM, Christian Grob

Selecting relationships without restriction

2011-11-06 Thread Christian Grobmeier
Hi all, I have two tables Article and Price. The table Price can containt historic prices which should not be selected. I do something like that: Expression expression = ExpressionFactory.matchExp("prices.historic", false); Expression fullExp = expression.orExp(ExpressionFactory.matchExp("prices

Re: Cayenne-generated classes need @SuppressWarnings("serial")

2011-10-02 Thread Christian Grobmeier
>> The @SuppressWarnings("serial") annotation will get rid of the >> warnings, but of course I don't want to manually update the generated >> classes. > > Yeah, that one kind of bothers me as well. Why wouldn't you just generate a > default serial number? Or a random one? > Actually generating se

Re: Getting null instead of the actual value

2011-09-16 Thread Christian Grobmeier
this place getThird should cause a SQL query? If this is not the case it still does not explain why it worked from time to time. I am really interested in what caused this problem. Thanks guys for all your patience with me. Cheers, Christian > Andrus > > > On Sep 16, 2011, at 10:01 PM,

Re: Getting null instead of the actual value

2011-09-16 Thread Christian Grobmeier
may cause duplication issues for addToY(). >> >> I hope it doesn't. But since I am trained to just set the rel in one >> direction, I may not be aware of the issue. >> >> >> On Sep 16, 2011, at 9:12 PM, Mike Kienenberger wrote: >> >>> On F

Re: Getting null instead of the actual value

2011-09-16 Thread Christian Grobmeier
; > Do you prefetch the roles when fetching a user (as in > SelectQuery.addPrefetch(..))? That's one possible way to refresh > relationships. > > Andrus > > > > On Sep 16, 2011, at 12:40 PM, Christian Grobmeier wrote: >>>> ObjectContext ctx = // get cont

Re: Getting null instead of the actual value

2011-09-16 Thread Christian Grobmeier
>> ObjectContext ctx = // get context >> User user = ctx.newObject(User.class); >> ObjectContext ctx = // get another context (from ThreadLocal - should be the >> same?) > > If this whole piece of code is from the same request, and the first context > is obtained from ThreadLocal, then the contex

Re: Getting null instead of the actual value

2011-09-16 Thread Christian Grobmeier
drus > > On Sep 13, 2011, at 6:20 PM, Christian Grobmeier wrote: > >> Hi Andrus, >> >> thanks for the comments. I will check that again and come back on >> thursday with the answer (currently on travel). >> What bugs me really is that it works sometimes, and some

Re: Getting null instead of the actual value

2011-09-13 Thread Christian Grobmeier
ng the UserRole outside the >>> DataContext.  Try something like: >>> >>> UserRoles userRoles = user.getObjectContext.newObject(UserRoles.class); >>> userRoles.setUser(user); >>> userRoles.setRole(role); >>> >>> mrg >>> >

Re: Getting null instead of the actual value

2011-09-13 Thread Christian Grobmeier
> Hi Christian, > > I suspect it is because you are creating the UserRole outside the > DataContext.  Try something like: > > UserRoles userRoles = user.getObjectContext.newObject(UserRoles.class); > userRoles.setUser(user); > userRoles.setRole(role); > > mrg > > >

Re: Getting null instead of the actual value

2011-09-06 Thread Christian Grobmeier
ke I had once in Hibernate or Toplink world) > > On Tue, Sep 6, 2011 at 12:46 PM, Christian Grobmeier > wrote: >> Hi Michael, >> >>> I suspect it is because you are creating the UserRole outside the >>> DataContext.  Try something like: >>> >>&

Re: Getting null instead of the actual value

2011-09-06 Thread Christian Grobmeier
tContext.newObject(UserRoles.class); >>> userRoles.setUser(user); >>> userRoles.setRole(role); >>> >>> mrg >>> >>> >>> On Tue, Sep 6, 2011 at 11:14 AM, Christian Grobmeier >>> wrote: >>>> Folks, >>>> >>

Re: Getting null instead of the actual value

2011-09-06 Thread Christian Grobmeier
- I will test this. This would explain why it gets into the database but is missed in the context Cheers > > mrg > > > On Tue, Sep 6, 2011 at 11:14 AM, Christian Grobmeier > wrote: >> Folks, >> >> I need your help. An error in my app bugs me and I am looking &

Re: Getting null instead of the actual value

2011-09-06 Thread Christian Grobmeier
itChanges();) > > Totally easy! :) hehehe I agree it is totally easy and I must say I have called commitChanges but it didn't work - thats why I felt so dumb :-) Thanks for looking in my hard to read example - I already see another valuable tipp in the thread Cheers > > Joe &

Getting null instead of the actual value

2011-09-06 Thread Christian Grobmeier
Folks, I need your help. An error in my app bugs me and I am looking desperately were it could happen. The use case is: - create a user - create a user_role object - select one of the existing roles - connect all together and commit I see that all values are correct in the database (mysql consol

Re: What JSON library are you using with cayenne?

2011-09-02 Thread Christian Grobmeier
t worked for you. Cheers Christian > > Thanks. > > > -Original Message- > From: Christian Grobmeier [mailto:grobme...@gmail.com] > Sent: Thursday, September 01, 2011 10:20 AM > To: user@cayenne.apache.org > Subject: Re: What JSON library are you using with cayenne? >

Re: What JSON library are you using with cayenne?

2011-09-01 Thread Christian Grobmeier
Hello David, On Thu, Sep 1, 2011 at 4:00 PM, Pipes, David wrote: > What are you all using for your JSON library with cayenne? I am looking for > some feedback on what works well out of the box or with little work. I can't > seem to find a good JSON library that works well with cayenne and db2 o

Re: Webservice and Cayenne

2011-08-26 Thread Christian Grobmeier
On Wed, Aug 24, 2011 at 6:51 PM, Tony Giaccone wrote: > I know that ROP and the hessian protocol are actively being > used, but I don't think those have a place in what I want to build (no jvm > on client side). As it is Hessian, you don't need a JVM in theory. You could read the ROP in PHP or wh

Re: Web Performance

2011-08-18 Thread Christian Grobmeier
> My research has lead me to "java totally sucks" or "php totally sucks" sorts > of comments vs a professional analysis. Have you really thought you would find something else? ;-) > Finally, I am not aware of any ORM libraries for PHP that would even come > close to Cayenne. Actually I think o

Re: Advice needed: should I migrate from Hibernate to Cayenne?

2011-08-12 Thread Christian Grobmeier
Hello Joachim, first a little bit of shameless selfpromotion: in one of the next JavaMagazins you can read an article on Cayenne which shows up some differences to Hibernate. Anyway it might be to long for you. My background, I have used JDO before ages, was forced to use Toplink for a while and t

Re: group by and others

2011-05-25 Thread Christian Grobmeier
Thanks - I will stick with SQLTemplate/IndirectQuery then Cheers Christian On Tue, May 24, 2011 at 3:06 PM, Andrus Adamchik wrote: > EJBQLQuery supports those. > > On May 24, 2011, at 5:53 AM, Christian Grobmeier wrote: > >> Hey all, >> >> how do I do create &q

group by and others

2011-05-24 Thread Christian Grobmeier
Hey all, how do I do create "group by" or "sum" queries with Cayenne? Is an IndirectQuery/SQLTemplate the best way to do it? Cheers Christian

Re: Generated SQL

2011-05-06 Thread Christian Grobmeier
ated for a given DbEntity in the mapping. > > Andrus > > > On May 6, 2011, at 5:04 PM, Christian Grobmeier wrote: > >> Hi, >> >> sometimes Cayenne generates SQL like: >> >> ... FROM schema.table WHERE... >> >> and sometimes it generates: >

Generated SQL

2011-05-06 Thread Christian Grobmeier
Hi, sometimes Cayenne generates SQL like: ... FROM schema.table WHERE... and sometimes it generates: ... FROM table WHERE... I would like to make sure its only using the second one. How can I achieve this behaviour? Thanks in advance, Christian

Re: Null Date is returned with 01.01.1970

2011-05-05 Thread Christian Grobmeier
> Look in the options you can pass to the JDBC connector for mysql. You can > either have mysql return proper NULL dates or these unix time zero dates > which is how it internally stores NULL dates. Thanks Ari. It was: jdbc:mysql://localhost/mydb?zeroDateTimeBehavior=convertToNull Cheers, Christ

Null Date is returned with 01.01.1970

2011-05-05 Thread Christian Grobmeier
Hey all, i have NULL in the database (MySQL). If I select it, it will return endTime=Thu Jan 01 00:00:00 CET 1970 This is taken from the values map in the CayenneDataObject M2 Line 193 - 195. public Object readPropertyDirectly(String propName) { return values.get(propName); } It

Easy way to update objects

2011-04-21 Thread Christian Grobmeier
Hi, I have a detached object with a PK. I would like to update a matching object in the database with the values of the detached object. Can this easily done? At the moment i see only the chance to select an object from the database and manually copy over all the new values to the attached objec

Re: Build from trunk

2011-04-12 Thread Christian Grobmeier
>> Yes, I already saw there is no code. But mvn eclipse:eclipse should >> not fail imho even when there is no code in it. Probably I simply want >> to edit the html files with my favourite eclipse plugin. > > If we can fix it, I won't argue against it :-) I will give it a try later ;-) basically I

Re: Build from trunk

2011-04-12 Thread Christian Grobmeier
Hi, > All Eclipse files for the modules that people normally care to have in > Eclipse are checked in to SVN, so just importing the modules should be ok. > You prolly don't need the docs module in Eclipse. There's no code in there. Yes, I already saw there is no code. But mvn eclipse:eclipse sh

Build from trunk

2011-04-12 Thread Christian Grobmeier
Hello guys, I am back :-) and would like to include the trunk version of Cayenne in my project. No worries, I will use a stable version when it goes to production. But I hope to learn more about Cayenne itself when I use the direct source. Probably I can do a few patches. However, i have checked

Re: Automatically creating database schema

2011-02-20 Thread Christian Grobmeier
Actually i have made the same experience. It worked 1 time, then never again. But I didn't track it, I used the migration tool in the modeller. On Sun, Feb 20, 2011 at 4:32 PM, Andrus Adamchik wrote: > Odd. Configuration seems correct. So what do you see in the logs when Cayenne > starts in your

Re: Storing information in a join table

2011-02-18 Thread Christian Grobmeier
ate column on the join table for keeping >> track of exactly when the association was created... stuff like that). >> >> Cheers, >> >> Robert >> On Feb 18, 2011, at 2/184:10 AM , Christian Grobmeier wrote: >> >>>> What semantically is "is

Re: Storing information in a join table

2011-02-18 Thread Christian Grobmeier
s dynamic, like timestamp, you can try intercept > Cayenne's generating of queries: > http://cayenne.apache.org/doc30/custom-batchquerybuilder-factory.html > > 2011/2/18 Christian Grobmeier : >> Hello, >> >> I have the following scenario: >> >> Apple

Storing information in a join table

2011-02-18 Thread Christian Grobmeier
Hello, I have the following scenario: Apple 1 -> n ApplePlum n : 1 Plum I want store an additional flag in ApplePlum (lets say isFresh = true/false How can I do this? I know I should not use flattened relations, but they are so nice, I would like to keep them. At least it would lead to the Meth

Re: Unique Indexes with the modeller

2011-02-16 Thread Christian Grobmeier
gt;>> Actually I would like to know whether there is any support for this in cm >>> because I've been appending them manually in generated schemata. >>> >>> On 02/16/2011 12:40 PM, Christian Grobmeier wrote: >>>> >>>> Hello, >>>

Re: Unique Indexes with the modeller

2011-02-16 Thread Christian Grobmeier
/16 Marek Šabo : >> Actually I would like to know whether there is any support for this in cm >> because I've been appending them manually in generated schemata. >> >> On 02/16/2011 12:40 PM, Christian Grobmeier wrote: >>> >>> Hello, >>> &g

Unique Indexes with the modeller

2011-02-16 Thread Christian Grobmeier
Hello, how can I create a unique index on a column with the modeller? Couldn't find any information even with google :-) I also could not find any info about indexing in Cayenne in general... my tables are all without an index (except my primary key, which is indexed by default). I am using Cay

Re: ObjectContext per thread or per app?

2011-02-16 Thread Christian Grobmeier
tml > > Hope that helps, > Andrey > > 2011/2/16 Christian Grobmeier : >> Hello, >> >> sorry, a dumb question: >> >> do I need a ObjectContext per thread or per app? >> >> In fact I wrote a spring bean (its a singleton) which creates one >>

ObjectContext per thread or per app?

2011-02-16 Thread Christian Grobmeier
Hello, sorry, a dumb question: do I need a ObjectContext per thread or per app? In fact I wrote a spring bean (its a singleton) which creates one single ObjectContext for all my app. In other terms, multiple threads will use it to insert, read, commit etc. Since ObjectContext offers the commit m