Re: Remote Example

2009-04-29 Thread Peter Karich
Hi Aristedes! I submitted the issue here: https://issues.apache.org/jira/browse/CAY-1216 Let me know if this works for you. Regards, Peter.

Hibernate Migration

2009-04-26 Thread Peter Karich
Hi, I am in the process of trying a migration from hibernate to cayenne and I read on the list that there is no tool provided for doing this automatically, right? Now I see that the modeler says that there are IDs missing in relationship tables. With relationship table I mean the table between a

Re: Remote Example

2009-04-25 Thread Peter Karich
Hi again, finally I got the mavenized tutorial in the subversion working. So, again step by step: 1. get the remote-object-persistence-tutorial from source and replace the dependencies with the latest versions (I used cayenne 3.0M5 - see the appended pom's). 2. update the autogenerated classes

Re: Suggestion: Don't Fault Relationship On Add

2007-12-11 Thread Peter Karich
Hi Daniel, it seems to me that CayenneDataObject.addToManyTarget(String targetName, DataObject obj, boolean reverse); and CayenneDataObject.setToOneTarget(String targetName, DataObject obj, boolean reverse); could do the job for you. Am I right? Peter.

Re: Populating JTable and JList with data

2007-11-12 Thread Peter Karich
Phoenix Hawk schrieb: Hi there... Background: using Cayenne 2.0.3 with NetBeans 5.5.1 (JDK 1.5) on Windows XP SP2... I have used the Cayenne Modeler to perform a reverse engineering on my existing database following the online tutorial. I am new to the java programming "model", previously I am

Re: Unregistered Objects

2007-08-13 Thread Peter Karich
Mike Kienenberger schrieb: I may be wrong but from my reading, I seem to recall that JPA supports unregistered objects, so JPA may be able to help you here. I think JPA also supports non-persisted objects in the class hierarchy, so you might even be able to define a TemporaryMeeting subclass (o

Unregistered Objects

2007-08-10 Thread Peter Karich
Hallo, as discussed here [1] and there [2]. I am seeking for a solution where the following works: Room r = new Room(); getContext().registerNewObject(r); Meeting m = new Meeting(); r.addMeeting(m); //[3] I get heavy memory problems in my calculations, while doing the following procedure 100

Re: Temporary Objects

2007-04-10 Thread Peter Karich
Mike Kienenberger schrieb: > On 4/10/07, Peter Karich <[EMAIL PROTECTED]> wrote: >> Do you mean that "nonpersistent -> (non)persistent" will be complicated? >> Why? I can do the following: >> >> public void addToManyTarget(O

Re: Temporary Objects

2007-04-10 Thread Peter Karich
Hallo, thank you again: now I got it! I needed examples :-) > Well, if you can mark each entity with whether it's persistent or not, Yes. > you could do this: > > public void addToManyTarget(Object obj, ...) > { >if obj.isNonpersistent() >{ >nonpersistentSet.add(obj); >} >

Re: Temporary Objects

2007-04-10 Thread peter karich
uot;misc", false); and nonpersistentObj.setToOneTarget(persistentObj, "misc", false); I have to think about it again, Peter Karich. ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Re: Temporary Objects

2007-04-06 Thread Peter Karich
d seems reasonable. On 3/27/07, Peter Karich <[EMAIL PROTECTED]> wrote: > > > Your second problem (trying to add references to non-persistent > > objects to a persistent object) is a hard one. If you post what > > you're trying to do specifically, maybe someone

Too many EventManager's?

2007-03-29 Thread Peter Karich
Hello! I profile my application with netbeans profiler. And I figured out that there are 12 (!) EventManager's DispatchThreads started. All are in the 'waiting' state. I have no problems with that :-) But could it be that this code is problematic: public static EventManager getDefaultManager() {

Re: Temporary Objects

2007-03-27 Thread Peter Karich
Mike Kienenberger schrieb: > Temporary is unregistered. Or marked as deleted but registered. > Your workaround seems reasonable. My unit test passes, after the "Object getID()" change. Thank you for that hint. I'll be back tomorrow if I get other/further problems :-) Peter. __

Re: Temporary Objects

2007-03-27 Thread Peter Karich
> Your second problem (trying to add references to non-persistent > objects to a persistent object) is a hard one. If you post what > you're trying to do specifically, maybe someone can suggest an > alternate design pattern. By default, Cayenne attempts to initialize > persistence if it finds

Re: Temporary Objects

2007-03-27 Thread Peter Karich
> I'm missing something. I don't understand why you don't do something > along these lines. > > nonpersistentObject.setObjectId(new Timestamp()); Yes! I was trapped in my idea that a pk has to be integer :-( Thank you! > You don't have to use the same kinds of object ids for your > non-persiste

Re: Temporary Objects

2007-03-27 Thread Peter Karich
;obj1 == obj2". I think the first line is always true, what about the second? Then I can create a SimilarEntry which holds a TimeInterval and "overloads" the equals method by comparing by the pointers (&q

Re: Temporary Objects

2007-03-27 Thread Peter Karich
for some calculation and not for persistence Is there another approach? Thank you, Peter Karich. ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Temporary Objects

2007-03-26 Thread Peter Karich
room",room,true) at caybug.TimeInterval.setRoom(TimeInterval.java:10) Thank you, Peter Karich. ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Re: Datanode -> XML

2007-03-10 Thread Peter Karich
Hallo! I think xstream is very easy to use and it works fine for me. E.g. use: XStream xs = new XStream(new DomDriver()); //Xpp instead dom would be faster ... OutputStream os; try { os = new FileOutputStream(xmlFile); xs.toXML(obj, os); } finally { os.close(); } For deep object d

Re: AW: Store BitSet

2007-03-09 Thread Peter Karich
dProperty(BIT_SET_PROPERTY)); ObjectInputStream o = new ObjectInputStream(bais); BitSet date = (BitSet) o.readObject(); //is closing necessary: (?) o.close(); Thank you again and sorry for this not-cayenne-related question, Pet

Store BitSet

2007-03-08 Thread Peter Karich
rther documentation on that subject? Because I can't find useful informations in javadocs and google results. Does anyone has a simple example of reading+writing an arbitrary object? Thank you, Peter Karich. ___ Telefonate ohne weit