Andrus Adamchik | 1 Dec 11:59 2006

Re: can't modify relationships in validateForUpdate()?

Yeah, the current build produces jars similar to the old cayenne- 
nodeps.jar, so you'll have to include dependencies manually (which  
may not be a bad thing).

Alternatively (if you are looking for the bug fixes, but can wait  
with the new features), you can build the 2.0 branch which is stable,  
contains Apache package names, and still uses Ant:

https://svn.apache.org/repos/asf/incubator/cayenne/main/branches/ 
STABLE-2.0/cayenne/

Andrus

On Nov 28, 2006, at 11:26 PM, Kevin Menard wrote:
>> -----Original Message-----
>> From: Bryan Lewis [mailto:bryan <at> maine.rr.com]
>> Sent: Tuesday, November 28, 2006 2:01 PM
>> To: cayenne-user <at> incubator.apache.org
>> Subject: Re: can't modify relationships in validateForUpdate()?
>>
>> I got close, I think.  I installed maven and checked out the source
> from
>> svn, and got it to almost build.  (After commenting out the
>> "cayenne-osx" line of assembly/pom.xml.  Sensible?)  After 28 minutes
> of
>> churning :-)  it produced a few jars like
>> cayenne-jdk1.4-3.0-incubating-SNAPSHOT.jar, but none of them look  
>> like
>> the good old cayenne.jar; they don't include externals such as log4j
> for
(Continue reading)

Andrus Adamchik | 1 Dec 12:13 2006

Re: Persistence and inheritance : a noob question

Performance wise, single-table inheritance is the winner, while  
multiple table inheritance (vertical usually with one common table  
and a specific table per class) is the most flexible solution IMO, so  
both have their uses.

Cayenne currently supports the first scenario, and will support the  
second in 3.0 (haven't tried current composite vertical inheritance  
workaround myself, so I can't comment on it).

Andrus

On Nov 29, 2006, at 5:14 PM, Tomi N/A wrote:
> 2006/11/28, Malcolm Edgar <malcolm.edgar <at> gmail.com>:
>> My 2 bits worth..
>>
>> I find the single table model works better than modeling class
>> inheritance through multiple tables. The reason being you have less
>> referential integrity constraints to worry about when  using a single
>> table
>
> Still, if you have e.g. people, devices, rooms and buildings and you
> want to schedule their use, you might construct a GenericResource
> table with a couple of it's own attributes and consider everything
> else a specialization of the GenericResource.
> What I mean to say is that obviously there are cases where separate
> tables are the only sensible conclusion. I'm keen to know: does
> cayenne handle that scenario?
>
> Cheers,
> t.n.a.
(Continue reading)

Andrus Adamchik | 1 Dec 12:53 2006

Re: NullPointerException when setting deletion rules

Hmm... I'd say Cayenne should be smarter about this case. Could you  
please open a bug report?

In the meantime you may have to manually break relationship cycles  
before deleting objects. E.g.:

ti.setToOneTarget("room", null, false);

Andrus

On Nov 29, 2006, at 1:48 AM, Peter wrote:
> Hallo!
>
> I reduced my application code to the following:
>
> -------------------------------------------------
>            ArrayList temporaryObjects = new ArrayList();
>         DataContext context = DataContext.createDataContext();
>
>         Room r = (Room) context.createAndRegisterNewObject 
> (Room.class);
>         r.setName("testRoom");
>         temporaryObjects.add(r);
>
>         TimeInterval ti = (TimeInterval) 
> context.createAndRegisterNewObject(TimeInterval.class);
>         temporaryObjects.add(ti);
>         ti.setToOneTarget("room", r, false);
>
>         context.deleteObjects(temporaryObjects);
(Continue reading)

Michael Gentry | 1 Dec 14:56 2006
Picon

Re: Re: best practice for handling database schema changes

I found this yesterday (although I haven't read it all yet):

http://www.stepwise.com/Articles/2005/DBChanges/index.html

Not sure if it'll be helpful, but it looks similar to some ideas I had
been pondering in the past.

/dev/mrg

On 11/30/06, Michael Gentry <blacknext <at> gmail.com> wrote:
> Currently you have to manually merge the changes just as you states.
> I should probably make an FAQ for this ...
>
> Thanks,
>
> /dev/mrg
>
>
> On 11/30/06, Tobias SCHOESSLER <Tobias.Schoessler <at> unvienna.org> wrote:
> >
> > hi,
> > What is the best practice for handling changes to the database schema once a
> > cayenne mapping was created?
> > We use the 'reverse engineer from database' feature to create an initial
> > mapping. But then we usually have to do manual changes like map some pks,
> > add flattened relationships, etc.
> > If then the database schema needs to be changed we usually have a problem as
> > 'reverse engineer from database' overwrites everything. There seems to be
> > the possibility to replace only selected tables but if you do this the
> > relationships are messed up. Is there a way to  merge the changes with the
(Continue reading)

Andrus Adamchik | 1 Dec 16:43 2006

Re: best practice for handling database schema changes

That's a good one. I wonder if we should adopt something like that as  
a Cayenne extension and use for things like prefs DB versioning in  
the Modeler?

Andrus

On Dec 1, 2006, at 4:56 PM, Michael Gentry wrote:

> I found this yesterday (although I haven't read it all yet):
>
> http://www.stepwise.com/Articles/2005/DBChanges/index.html
>
> Not sure if it'll be helpful, but it looks similar to some ideas I had
> been pondering in the past.
>
> /dev/mrg
>
>
> On 11/30/06, Michael Gentry <blacknext <at> gmail.com> wrote:
>> Currently you have to manually merge the changes just as you states.
>> I should probably make an FAQ for this ...
>>
>> Thanks,
>>
>> /dev/mrg
>>
>>
>> On 11/30/06, Tobias SCHOESSLER <Tobias.Schoessler <at> unvienna.org>  
>> wrote:
>> >
(Continue reading)

Tomi N/A | 1 Dec 16:45 2006
Picon

Re: Persistence and inheritance : a noob question

2006/12/1, Andrus Adamchik <andrus <at> objectstyle.org>:
> Performance wise, single-table inheritance is the winner, while
> multiple table inheritance (vertical usually with one common table
> and a specific table per class) is the most flexible solution IMO, so
> both have their uses.

At the moment, I'm not that concerned about performance: it's more
that I feel rather limited by the framework, now that I've gotten used
to doing everything with it. :)
There will be situations where multitable inheritence will be a
necessity so I'm trying to plan in advance.

> Cayenne currently supports the first scenario, and will support the
> second in 3.0 (haven't tried current composite vertical inheritance
> workaround myself, so I can't comment on it).

Is there a due date...or a due week...month...year?

Cheers,
t.n.a.

Cris Daniluk | 1 Dec 16:48 2006
Picon

serialization error

I've turned on Tomcat clustering on an existing application, and thus
the session-bound user DataContext is being serialized across the
wire. Whenever I connect to a Tomcat node, the nodes that are
replicated to report the attached exception. Based on the line number
(Cayenne 1.2.1), it looks like the objectStore has null elements in
it, which does not make any sense.

Any ideas?

Cris

ERROR [org.apache.catalina.cluster.tcp.TcpReplicationThread[1]] -
2006-12-01 10:44:42,264 Manager [/integration]: Unable to receive
message through TCP channel
java.lang.NullPointerException
        at org.objectstyle.cayenne.access.DataContext.readObject(DataContext.java:1806)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
(Continue reading)

Andrus Adamchik | 1 Dec 16:53 2006

Re: Persistence and inheritance : a noob question


On Dec 1, 2006, at 6:45 PM, Tomi N/A wrote:

>> Cayenne currently supports the first scenario, and will support the
>> second in 3.0 (haven't tried current composite vertical inheritance
>> workaround myself, so I can't comment on it).
>
> Is there a due date...or a due week...month...year?

Oh please! There are no due dates here :-)

Andrus

Michael Gentry | 1 Dec 17:11 2006
Picon

Re: Re: Persistence and inheritance : a noob question

Magic 8Ball, will Cayenne have multi-table inheritance in 2006?
"Outlook not so good."

Well, there you have it.

On 12/1/06, Andrus Adamchik <andrus <at> objectstyle.org> wrote:
>
> On Dec 1, 2006, at 6:45 PM, Tomi N/A wrote:
>
> >> Cayenne currently supports the first scenario, and will support the
> >> second in 3.0 (haven't tried current composite vertical inheritance
> >> workaround myself, so I can't comment on it).
> >
> > Is there a due date...or a due week...month...year?
>
> Oh please! There are no due dates here :-)
>
> Andrus

Tomi N/A | 1 Dec 17:17 2006
Picon

Re: Re: Persistence and inheritance : a noob question

2006/12/1, Michael Gentry <blacknext <at> gmail.com>:
> Magic 8Ball, will Cayenne have multi-table inheritance in 2006?
> "Outlook not so good."
>
> Well, there you have it.

I was really hoping for "summer 2007", but hey, I'll take this New
Year's Eve. :)

t.n.a.


Gmane