Re: ManyToMany Relation returns transient objects

2024-05-06 Thread Markus Reich
s like a regular Many-To-Many relationship that should > just work. > > On Mon, May 6, 2024 at 12:46 PM Markus Reich > wrote: > > > Hi, > > > > I'm on the latest release 4.2 of Cayenne and run in a problem when > creating > > a many to many relationship

ManyToMany Relation returns transient objects

2024-05-06 Thread Markus Reich
Hi, I'm on the latest release 4.2 of Cayenne and run in a problem when creating a many to many relationship. I had table A und table B and a joining table C which contain the ID columns of A and B The relation is defined as many to many and Dep PK is marked for A and B, further the cascading of

Re: Problem with order when delete/inserting cascading objects

2023-04-14 Thread Markus Reich
e to decide what part of the PK > to PK relationship is leading. > > On Wed, Apr 12, 2023 at 9:34 AM Markus Reich > wrote: > > > > Hi, > > > > I'm using Cayenne 4.2.RC2 and have a special problem when deleting or > > creating objects that have a relation to others. >

Cayenne web module deprecated

2023-01-30 Thread Markus Reich
Hi, I saw that the web module is deprecated since 4.2 I checked the DB First docu of 4.2. but there's the module still in use? What is the new way to use cayenne with J2EE apps? best regards Meex

Re: MariaDB column with auto increment

2020-10-28 Thread Markus Reich
is set there. > > log4j.logger.org.apache.cayenne.log.JdbcEventLogger = INFO > > On Wed, Oct 28, 2020 at 2:35 AM Markus Reich > wrote: > > > Hi, > > > > I'm using Cayenne 4.1. > > I have an an object A with an one to one relation to another object B, > > in object B I got an co

MariaDB column with auto increment

2020-10-28 Thread Markus Reich
method and with a RefreshQuery but it stays 0? regards -- *Markus Reich* Waldweg 62 6393 St. Ulrich am Pillersee www.markusreich.at / www.meeximum.at markus.re...@markusreich.at

Re: [ANN] Cayenne 4.2.M2 release

2020-10-13 Thread Markus Reich
dea is using EXISTS instead of JOIN + > DISTINCT for to-many conditions [2]. > > Enjoy M2! > > Andrus > > [1] https://cayenne.apache.org/2020/10/cayenne-42m2-released/ > [2] https://issues.apache.org/jira/browse/CAY-2684 -- *Markus Reich* Waldweg 62 6393 St. Ulrich am Pillersee www.markusreich.at / www.meeximum.at markus.re...@markusreich.at

Re: Oracle JNDI DataSource connections stay active

2017-05-11 Thread Markus Reich
idationQuery? > > Actually I somehow missed it in my example. I do. But the DB is MySQL, so > the query is either this, or a select from a small table: > > validationQuery: select 1; > > Andrus > > > > On May 9, 2017, at 12:11 PM, Markus Reich <markus.re...@marku

Re: Oracle JNDI DataSource connections stay active

2017-05-09 Thread Markus Reich
a problem that you > describe. What are the connection pool settings? > > Andrus > > > On May 8, 2017, at 10:57 PM, Markus Reich <markus.re...@markusreich.at> > wrote: > > > > Hi, > > > > I have a problem with our JNDI DataSource (Catalina Connection

Oracle JNDI DataSource connections stay active

2017-05-08 Thread Markus Reich
Hi, I have a problem with our JNDI DataSource (Catalina Connection Pool). After a while I got a lot of active conns in the Pool (I can see them in via JMX), when I take a look in Oracles v$session, all sessions/conns are in IDLE state? The Problem is, that the pool thinks all sessions are active

Re: Stacktrace

2017-05-02 Thread Markus Reich
ok, I uploaded the screenshot https://drive.google.com/file/d/0B_9GdYVKbcezelB0ZGlEb1Bmc1k/view?usp=sharing John Huss <johnth...@gmail.com> schrieb am Di., 2. Mai 2017 um 16:04 Uhr: > The screenshot didn't come through for me. > > On Tue, May 2, 2017 at 5:17 AM Markus R

Stacktrace

2017-05-02 Thread Markus Reich
Hi, I have a question for a stacktrace I took on our prod. system. We are analyzing performance issues and found the method Invocation.equals(), when we drill down we get to the cayenne events. Is there someone who could explain those Invocation objects, is this the shared cache? I added a

Re: Detached Cayenne Objects

2017-04-20 Thread Markus Reich
creating a context > is very expensive, though? It should actually be pretty cheap > memory/cpu-wise. > > As for copying objects, are you copying committed objects or copying > new/modified objects and you need the new values? > > mrg > > > On Thu, Apr 20, 2017 at 7:12

Detached Cayenne Objects

2017-04-20 Thread Markus Reich
Hi, I have a very special problem :-/ We want to use a cayenne object as detached object, for a simple object this works fine, as the attribute values are hosted in a value map, but we need a context when we want to use the relations too :-/ What would be the best approach? At the moment we

Re: SnapshotVersion

2017-03-08 Thread Markus Reich
elect "Callbacks" tab). In the callback method you can reset the values. > More info on callbacks: > > http://cayenne.apache.org/docs/4.0/cayenne-guide/lifecycle-events.html > > Andrus > > > > On Mar 8, 2017, at 10:31 PM, Markus Reich <markus.re...@markusreich.at> > w

Re: SnapshotVersion

2017-03-08 Thread Markus Reich
a > callback/listener solution to it? > > Andrus > > > On Mar 6, 2017, at 5:04 PM, Markus Reich <markus.re...@markusreich.at> > wrote: > > > > Hi, > > > > I always thought that when the content of an object changes (by commit) > the > > version gets

Re: Fetching lots of objects

2017-03-06 Thread Markus Reich
Hi Maik, maybe you can use the new iterator and split the iterator for parallel computation? public static Stream asStream(Iterator sourceIterator, boolean parallel) { Iterable iterable = () -> sourceIterator; return StreamSupport.stream(iterable.spliterator(), parallel); } found at

SnapshotVersion

2017-03-06 Thread Markus Reich
Hi, I always thought that when the content of an object changes (by commit) the version gets incremented. I analyzed this a bit further and found sthg. which is very clear for me :-/ When I have two DataObjects with the same key/id and I change a value in one Object, I got a higher version after

Re: ObjectCache

2017-02-24 Thread Markus Reich
t local cache get in effect? Either I have references to > objects > >> anyway, or I would need to refetch them, which would go through to the > >> database, right? In what case would I get a benefit from a local cache? > I > >> didn't find answers to this in the Cayenne

ObjectCache

2017-02-23 Thread Markus Reich
Hi, I'm looking for a more detailed explaination of the caching mechanism, as we are running a quite important and big web application with cayenne, I want to fine tune, because we run in some performance issues. I only found this

Re: CommitChangesToParent() <> CommitChanges()

2017-02-23 Thread Markus Reich
Hi Maik, thx for your detailed and quick answer! Ok the thing with the ChildContext was my fault, although I should know better, shame on me :-/ But anyway the result of my test is the same. What I can verifiy is that when you commit sthg to a context, the child contexts gets synched

CommitChangesToParent() <> CommitChanges()

2017-02-22 Thread Markus Reich
Hi, I'm having some troubles understanding commitChanges() and commitChangesToParent() :-/ I've created a test case with two ObjectContexts ObjectContext context1 = runtime.newContext(); ObjectContext context2 = runtime.newContext(); then I load the same entity in both contexts

Re: Set timezone on connection

2015-08-03 Thread Markus Reich
of this? On Jul 31, 2015, at 5:18 PM, Markus Reich markus.re...@markusreich.at wrote: Hi, we've some problems with oracle and timzone in combination with daylight savings :-( When I search the web to this topic, I can see that we are not the only one having problems concerning oracle

Set timezone on connection

2015-07-31 Thread Markus Reich
Hi, we've some problems with oracle and timzone in combination with daylight savings :-( When I search the web to this topic, I can see that we are not the only one having problems concerning oracle and daylight saving ;-) But it seems that there's no proper solution to fix it :-( We found a

Re: cayenne 4.0

2015-04-27 Thread Markus Reich
looks good, how to I get the dataMap? I have two Maps in my Configuration? 2015-04-27 1:55 GMT+02:00 Aristedes Maniatis a...@maniatis.org: Something like: for (DbEntity dbEntity : dataMap.getDbEntities()) { dbEntity.setSchema(schema); } On 27/04/2015 7:35am, Markus Reich wrote: Hi

Re: cayenne 4.0

2015-04-27 Thread Markus Reich
PERFECT! thx 2015-04-28 0:18 GMT+02:00 Aristedes Maniatis a...@maniatis.org: On 28/04/2015 5:57am, Markus Reich wrote: looks good, how to I get the dataMap? I have two Maps in my Configuration? ObjectContext - EntityResolver - DataMaps -- -- Aristedes Maniatis

cayenne 4.0

2015-04-26 Thread Markus Reich
Hi, is it possible with cayenne 4.0 to use a dynamic data map? I have following requirement: I have a db scheme that is fix for all users. I habe a second dynamic scheme where the entities are equal, just the scheme names is dynamic? regards Meex

Re: Archive tables

2014-12-22 Thread Markus Reich
? Andrus Adamchik and...@objectstyle.org schrieb am Fri Dec 19 2014 at 11:24:29: Yeah, you'd start 2 runtimes, and rename a subset of DbEntities in one of them to add _A. Andrus On Dec 19, 2014, at 11:51 AM, Markus Reich markus.re...@markusreich.at wrote: ad 1., yes it's a multiuser

AW: Archive tables

2014-12-22 Thread Markus Reich
about your situation; Are you using Spring framework or some other DI framework at all? Are you wanting one ObjectContext per request-response cycle? Regards; On 23/12/14 2:13 am, Markus Reich wrote: As I'm using cayenne in a JSP environment, where would be the best place to create the 2nd

Re: Archive tables

2014-12-19 Thread Markus Reich
in the running app? Is this for all sessions or just specific users? Andrus On Dec 19, 2014, at 10:08 AM, Markus Reich markus.re...@markusreich.at wrote: Hi, I need some hints for a very special issue :-) We have archived old entries of our tables to shadow tables, which have exactly

Re: Archive tables

2014-12-19 Thread Markus Reich
are on Cayenne 3.1 / 4.0 here). One mapped to access regular tables, and another - the archive tables. And depending on a given user state, you allocate them an ObjectContext from the corresponding runtime. Andrus On Dec 19, 2014, at 11:24 AM, Markus Reich markus.re...@markusreich.at wrote: Hi

Re: Archive tables

2014-12-19 Thread Markus Reich
, Markus Reich markus.re...@markusreich.at wrote: Hi Andrus, the switch is durring runtime, so it's not defined at start up. The trigger is e.g. a checkbox in the ui where the user can decide if he want to read from archive. One idea was to create a view over archive and real table

Re: Cayenne+jasper reports

2014-10-30 Thread Markus Reich
: With cayenne 3.1, as I can get the connection to the database to pass it to jasperreports? René -- *Markus Reich* Waldweg 62 6393 St. Ulrich am Pillersee www.markusreich.at / www.meeximum.at markus.re...@markusreich.at

Re: Default values in DB

2014-06-24 Thread Markus Reich
that it is there. DDL operations do though. Something to think about ... Andrus On Jun 24, 2014, at 1:51 PM, Markus Reich markus.re...@markusreich.at wrote: Hmm, I think it's just the INSERT command, a solution would be that only values are inserted that are not NULL? As you check

Default values in DB

2014-06-13 Thread Markus Reich
Hi, would it make sense to add in Cayennen Modeler a field to set a default value. Cayenne set's per default all fields to null, if they weren't set in Java? regards Meex

Re: Cayenne 3.0.2 - Global exception - frequent issue in my application

2014-04-08 Thread Markus Reich
. -- Markus Reich Moosbach 28/2 6392 St. Jakob i.H. www.markusreich.at / www.meeximum.at markus.re...@markusreich.at

Re: get Connection URL at runtime

2014-02-17 Thread Markus Reich
perfect thx 2014-02-17 8:44 GMT+01:00 Andrus Adamchik and...@objectstyle.org: Here is a Cayenne-agnostic way: String url = dataSource.getConnection().getMetaData().getURL() HTH, Andrus On Feb 17, 2014, at 10:41 AM, Markus Reich markus.re...@markusreich.at wrote: Hi

get Connection URL at runtime

2014-02-16 Thread Markus Reich
Hi, is it possible to get the connection URL of the data-source, specified in the cayenne*.xml? regards Markus

Unchanged version of data object

2013-09-20 Thread Markus Reich
Hi, is there a way to get a unchanged (original version) of a CayenneDataObject that is changed and not commited? Or does a rollback reload data from DB? regards Markus

Optimistic Locking

2013-09-13 Thread Markus Reich
Hi, is there a possibility to disalbe optimistic locking for certain entites in runtime?` e.g. the user get's info that there's a optimistic locking problem, then the user can force the commit ignoring the optimistic lock? regards Markus

Child Contexts

2013-09-05 Thread Markus Reich
Hi, I've a question concering child contexts, when I add an object to a child context with method localObject, I thought the object is really from parent to child context? But when I run the following JUnit Test, it doesn't fail, although it should? @Test public void testChildContext() {

Re: Child Contexts

2013-09-05 Thread Markus Reich
the commitChangesToParent() moves the object from child to parent context? So after the commitToParent() the data is written and committed to db? regards Meex 2013/9/5 John Huss johnth...@gmail.com You have to assign the result of localObject. John On Sep 5, 2013 12:59 AM, Markus Reich

Re: Can't instantiate class but it exists

2013-07-31 Thread Markus Reich
.** getJavaClass(**DefaultAdhocObjectFactory.**java:102) at org.apache.cayenne.util.Util.**getJavaClass(Util.java:658) at org.apache.cayenne.map.**ObjEntity.getJavaClass(** ObjEntity.java:299) -- *Markus Reich* Moosbach 28/2 6392 St. Jakob i.H. www.markusreich.at / www.meeximum.at markus.re

Re: Unit Testing WebApp with 3.2M1 release

2013-07-24 Thread Markus Reich
perfect, thx 2013/7/24 John Huss johnth...@gmail.com getContext() was renamed to newContext() On Wed, Jul 24, 2013 at 3:51 PM, Markus Reich markus.re...@markusreich.atwrote: Hi, I'm using following code for unit testing: package db; import org.apache.cayenne.ObjectContext

Re: Change data by an external process (non cayenne)

2013-05-24 Thread Markus Reich
though. All that is needed is that all contexts access those objects via a query instead of storing a direct reference. Andrus On May 16, 2013, at 12:14 PM, Markus Reich markus.re...@markusreich.at wrote: :-) sorry, I try it more detailed I have a multiuser Tomcat Webapp, the DB

Re: Change data by an external process (non cayenne)

2013-05-16 Thread Markus Reich
more detail? Also does your interface needs to know when an object is invalidated right at that moment or is it enough to make the object hollow so that it is refetched lazily on next access? Andrus On May 16, 2013, at 7:52 AM, Markus Reich markus.re...@markusreich.at wrote: would

Prefetch paths

2013-05-15 Thread Markus Reich
Hi, is it possible to use wildcards in prefetch paths? e.g. query.addPrefetch(paintings.gallery); regards Meex

Change data by an external process (non cayenne)

2013-05-15 Thread Markus Reich
Hi, is there really no better way than described here: http://markmail.org/message/plnaj4zj4gxrt6hk regards Meex

Re: Prefetch paths

2013-05-15 Thread Markus Reich
, Markus Reich markus.re...@markusreich.atwrote: Hi, is it possible to use wildcards in prefetch paths? e.g. query.addPrefetch(paintings.gallery); regards Meex -- *Markus Reich* Moosbach 28/2 6392 St. Jakob i.H. www.markusreich.at / www.meeximum.at markus.re

Re: Prefetch paths

2013-05-15 Thread Markus Reich
idea to add that in the future … ) On May 15, 2013, at 4:36 PM, Markus Reich markus.re...@markusreich.at wrote: oops, sorry, it should be like this query.addPrefetch(paintings.*); 2013/5/15 Michael Gentry mgen...@masslight.net Hi Markus, I don't see a wildcard

Re: Change data by an external process (non cayenne)

2013-05-15 Thread Markus Reich
the data is changed. Andrus On May 15, 2013, at 4:28 PM, Markus Reich markus.re...@markusreich.at wrote: Hi, is there really no better way than described here: http://markmail.org/message/plnaj4zj4gxrt6hk regards Meex -- *Markus Reich* Moosbach 28/2 6392 St. Jakob i.H

Re: Change data by an external process (non cayenne)

2013-05-15 Thread Markus Reich
refresh events via JMS. Your external process would send such events via ActiveMQ (that supports a bunch of command-line friendly protocols, not just JMS) whenever the data is changed. Andrus On May 15, 2013, at 4:28 PM, Markus Reich markus.re...@markusreich.at wrote: Hi, is there really

Disabling caching for relationship queries

2013-05-08 Thread Markus Reich
Hi, is there a possibility to disable the default cayenne caching mechanism used to get relational data? I already set Shared Cache to false and Number of Objects to 0, but it still doesn't work :-( regards Meex

Re: Revert object changes without rollback

2013-04-26 Thread Markus Reich
context of that context and work with a copy of the object in the child context. On Wed, Apr 24, 2013 at 2:37 PM, Markus Reich markus.re...@markusreich.at wrote: Hi, is it possible to revert changes of an object? I don't want to use rollback because changes of other objects shouldn't

Revert object changes without rollback

2013-04-24 Thread Markus Reich
Hi, is it possible to revert changes of an object? I don't want to use rollback because changes of other objects shouldn't be reverted? I know about child contexts, but my problem is, i select a collection of object, and change them in a differnt UI view and in this view I want to revert the

Re: Relationship

2013-04-23 Thread Markus Reich
use looks like.. CommentListProvider.addComment(Object, text); ListComment list = CommentListProvider.getCommentList(Object); On Tue, Apr 23, 2013 at 9:21 AM, Markus Reich markus.re...@markusreich.at wrote: ok, e.g. I have a table comments with following columns ID = Unique key

Relationship

2013-04-22 Thread Markus Reich
Hi, with the wonderful Cayenne Modeler it's possible to easily create relations between DB entities. In my case I have a central table for comments, with a key specifying the content. No I need to map this key field to a constant literal, as I know it is just possible to join fields with fields

Webapplication with 2 ObjectContexts

2013-04-19 Thread Markus Reich
Hi, is it possible to create a second context to make an atomic update to an object not disturbing the main context? e.g. in the application you can change data in a fom, there are two buttons save and revert by the way the user can add comments to the form, when he clicks add comment a popup

Re: Webapplication with 2 ObjectContexts

2013-04-19 Thread Markus Reich
/** cayenne/DataChannel.htmlhttp://cayenne.apache.org/docs/3.1/api/org/apache/cayenne/DataChannel.html parentChannel) On 19/4/2013 21:49, Markus Reich wrote: Hi, is it possible to create a second context to make an atomic update to an object not disturbing the main context? e.g

Re: Webapplication with 2 ObjectContexts

2013-04-19 Thread Markus Reich
of each other. On Fri, Apr 19, 2013 at 4:14 PM, Markus Reich markus.re...@markusreich.at wrote: I tried, but it is not possible to commit data locally in a child context! I just can commitToParent :-( 2013/4/19 Marc A. Donis m...@runbox.com I think what you need is a child context

Re: [ANN] Cayenne 3.1B2 released

2013-02-18 Thread Markus Reich
. -- *Markus Reich* Moosbach 28/2 6392 St. Jakob i.H. www.markusreich.at / www.meeximum.at markus.re...@markusreich.at

Re: select distinct ...

2012-12-06 Thread Markus Reich
. What is the best way to do it in cayenne? Should I have to filter them in memory or is there another way? Thanks -- *Markus Reich* Moosbach 28/2 6392 St. Jakob i.H. www.markusreich.at / www.meeximum.at markus.re...@markusreich.at