Creates a new Object but this object already existing.

2004-06-23 Thread Alexandre BOISSEAU
Hi, I have spent two days on the following problem: let a class A having an object attribute bObj of class B. When I make an object aObj of class A persistent and modify it, but without mofifying the bObj attribute, then OJB tries to insert bObj into the database. As bObj already exists, JDO

Collection Proxy question

2004-06-23 Thread Bogdan Daniliuc
Hi all, We are encountering a problem when using collections with proxy (OJB rc6). An object has a mapping with an attached collection as: class-descriptor ... collection-descriptor name=entries element-class-ref=elementClass proxy=true auto-update=true

Creates a new Object but this object already existing.

2004-06-23 Thread Alexandre BOISSEAU
Hi, I have spent two days on the following problem: let a class A having an object attribute bObj of class B. When I make an object aObj of class A persistent and modify it, but without mofifying the bObj attribute, then OJB tries to insert bObj into the database. As bObj already exists, JDO

Creates a new Object but this object already existing.

2004-06-23 Thread Alexandre BOISSEAU
Hi, I have spent two days on the following problem: let a class A having an object attribute bObj of class B. When I make an object aObj of class A persistent and modify it, but without mofifying the bObj attribute, then OJB tries to insert bObj into the database. As bObj already exists, JDO

Re: Best way to use OQL with PB

2004-06-23 Thread Thomas Mahler
Hi Clovis, Clóvis Wichoski wrote: Hi, I'm using PersistenceBroker and need use OQL only for selecting objects, then I will use OQLQueryImpl, only to make the Query object for me, but I have two issues in doubt: 1) Executing query with broker ... OQLQueryImpl oql = new

OJB/JSP app: how to structure it?

2004-06-23 Thread Paolo Salvan
Hi! I' starting the development of a non-trivial web app using ojb, mysql, and jsp... I havent't clear ideas about which is the right moment to create/close the various objects, to get the best architecture and to take advantage of the connection-pooling. In order to launch queries, to update

Re: OJB/JSP app: how to structure it?

2004-06-23 Thread Thomas Dudziak
Paolo Salvan wrote: Hi! I' starting the development of a non-trivial web app using ojb, mysql, and jsp... I havent't clear ideas about which is the right moment to create/close the various objects, to get the best architecture and to take advantage of the connection-pooling. In order to launch

Re: OJB/JSP app: how to structure it?

2004-06-23 Thread salgado.pc
Paolo Salvan wrote: Hi! I' starting the development of a non-trivial web app using ojb, mysql, and jsp... I havent't clear ideas about which is the right moment to create/close the various objects, to get the best architecture and to take advantage of the connection-pooling.

Re: OJB/JSP app: how to structure it?

2004-06-23 Thread dennis bekkering
You most certainly don't want to code business functionality right into the JSP. Your project sounds like it would benefit from the Struts framework, have a look here: http://jakarta.apache.org/struts/ and here for a tutorial: http://www.fawcette.com/javapro/2002_07/online/kjones/ Also,

AW: RC7 Transactions

2004-06-23 Thread Ralf Alt
Hi Armin, thanks for your help! Ralf Alt -Ursprungliche Nachricht- Von: Armin Waibel [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 22. Juni 2004 18:20 An: OJB Users List Betreff: Re: RC7 Transactions Hi Ralf, seems you have an typo in OJB.properties, try

Re: Timestamp problem with Optimistic Locking

2004-06-23 Thread Brian McCallister
Michael, Thank you for digging into this, I noticed the same behavior on postgres as well. If you want to track down the materialization code, start in org.apache.ojb.broker.accesslayer package. On Jun 23, 2004, at 1:01 AM, Michael A. Hovan III wrote: Hello, I have been debugging a problem (for

Re: Timestamp problem with Optimistic Locking

2004-06-23 Thread Armin Waibel
Hi, yesterday I checked in a patch from Martin Kalen to fix his optimistic locking problems with oracle (not possible to set nanoseconds). Maybe this will help to solve your problem. regards, Armin Index: ClassDescriptor.java ===

How to use criteria.addLessOrEqualThan(colname,date)

2004-06-23 Thread Mike Young
Hi, I am trying to write a query to find all records from a table that have an expiry date of less than or equal to todays date. e.g. select col1,col2 from orders where expires = 2003-06-23 if I use - snip - long currentTime = System.currentTimeMillis(); java.sql.Date sysdate =

Both sides of M:N mapping not correctly retrieved in rc7

2004-06-23 Thread Bradford Pielech
Hello again: I have encountered an issue with the recursive graph structure that I asked about a couple of weeks ago. Below is a snippet from the repository.xml. Basically I have a DAGNode that has a list of parents and a list of children. I am able to get everything loaded in OJB

Re: Both sides of M:N mapping not correctly retrieved in rc7

2004-06-23 Thread Armin Waibel
Hi Brad, could you please send a junit test or a code snip to reproduce this behavior? I will integrate your test to test-suite. regards, Armin Bradford Pielech wrote: Hello again: I have encountered an issue with the recursive graph structure that I asked about a couple of weeks ago.

Re: Both sides of M:N mapping not correctly retrieved in rc7

2004-06-23 Thread Bradford Pielech
Armin: Sure, no problem. Apologies for the formatting, but the basic idea should be clear. I also attached my OJB.properties and repository_user.xml. thanks! Brad SimpleDagNode class: --- public class SimpleDAGNode{ private List children; private String

Re: Both sides of M:N mapping not correctly retrieved in rc7

2004-06-23 Thread Bradford Pielech
Oops, just realized there was a logic bug in the junit test that makes the code incorrect because I had to quickly rewrite the test to remove unneeded subclasses and such. Here is the correct version: public void testAddNewChild() throws Exception { SimpleDAGNode nodeA = new nodeANode();

Re: Both sides of M:N mapping not correctly retrieved in rc7

2004-06-23 Thread Armin Waibel
seems you use an user specific PersistenceBroker implementation, can you post methods broker.addEntity(nodeA); broker.linkEntity(nodeA, nodeB); too. regards, Armin Bradford Pielech wrote: Oops, just realized there was a logic bug in the junit test that makes the code incorrect because I had to

Re: ODMG documentation?

2004-06-23 Thread Keith Rogers
I found this quite useful: http://www.comp.brad.ac.uk/~sahmed8/recommended.html [EMAIL PROTECTED] 21/06/2004 13:36:41 Hi, Can anybody tell me which is/are the most complete source/s of ODMG documentation? What I want to know is how to make complex (real-life!) querys through ODMG. Thanks in

Re: Both sides of M:N mapping not correctly retrieved in rc7

2004-06-23 Thread Bradford Pielech
yeah, those are basically wrappers to underlying broker methods. The addEntity method is a wrapper for the following method that accesses the persistence broker: public boolean addEntity(SimpleDagNode nodeA) throws Exception { PersistenceBroker pbroker =

Re: ODMG documentation?

2004-06-23 Thread Brian McCallister
Sadly, the best I know of is the FastObjects community web site. It requires free registration, but has a good ODMG reference available for download. http://community.fastobjects.com/supportweb/docu.nsf/OSS_61/ 3EFAFE80A7855AEBC1256A4C004FE2E2?opendocument -Brian On Jun 23, 2004, at 9:17

Using OJB with generalization hierarchies

2004-06-23 Thread Marinschek Martin
Hi there, I have read through the tutorials and the mail-archive, but have not found a solution to my problem: 1) I am using the PersistenceBroker API 2) I have a generalization hierarchy: class B and C both extend A (an abstract class) 3) I map this hierarchy to one table 4) I do a

Re: Using OJB with generalization hierarchies

2004-06-23 Thread Thomas Dudziak
Marinschek Martin wrote: Hi there, I have read through the tutorials and the mail-archive, but have not found a solution to my problem: 1) I am using the PersistenceBroker API 2) I have a generalization hierarchy: class B and C both extend A (an abstract class) 3) I map this hierarchy to one

Re: How do you map a reference to an interface-backed class? (non-trivial)

2004-06-23 Thread Jakob Braeuchi
hi thomas, andrew, i recently came across your discussion about mapping interfaces. the approach using a class-name-field is imo very interesting. i assume that the mapped classes only share a common interface and are not in the same extent-hierarchy in the repository. otherwise you would have

RE: Using OJB with generalization hierarchies

2004-06-23 Thread Marinschek Martin
Sorry, I had a field-conversion in place for the ojbConcreteClass-column and delivered the wrong value to the database. - Martin -Original Message- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 6:57 PM To: OJB Users List Subject: Re: Using OJB with

[rc7] deprecation of Criteria.addOrderBy(...)???

2004-06-23 Thread OJB Dev
Anyone know what the reason for this is? I had an abstracted bean class that its subclasses just took a pretty Criteria object for dealing with lookups. Now, it appears I'll have to pass a couple String Arrays to house Order and Group by classes. Is this correct? Just wondering if I was

Re: Both sides of M:N mapping not correctly retrieved in rc7

2004-06-23 Thread Armin Waibel
Hi Brad, good news! Seems to work. I checked in a new test case show how to use PB-api to store/retrieve/delete object hierarchies via m:n relation with different collection-descriptor auto-xxx settings. Main difference to your test is that I use two table (one for tree object, the other as

OJB + tomcat + OJB.properties

2004-06-23 Thread WHIRLYCOTT
Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread Thomas Dudziak
WHIRLYCOTT wrote: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread Charles N. Harvey III
Just like it says. There is no default descriptor. Somewhere in repository.xml there are jdbc-connection-descriptors. One of them must have: default=true. If not, OJB complains. Charlie WHIRLYCOTT said the following on 6/23/2004 4:00 PM: Greetings, I'm working away quite happily here with

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread Armin Waibel
Hi, I think it could be more simple. You lookup the PB instance via the convenience method PBF#.defaultPersistenceBroker(). To use this method you have to specify one connection-descriptor as default one. http://db.apache.org/ojb/docu/faq.html#lookupPB regards, Armin Thomas Dudziak wrote:

RE: [ANN] OJB 1.0rc7 Released

2004-06-23 Thread Phil Armour
Brian, Any word on the release announcement? -Phil -Original Message- From: Brian McCallister [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 9:24 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; OJB Developers List; OJB Users List Subject: [ANN] OJB 1.0rc7 Released The OJB team

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread WHIRLYCOTT
Actually, there is a default descriptor in my repository.xml file. I know that these files are well formed and contain valid information because I'm using them as-is within my dev environment without any problems. It seems to be some kind of an issue of the files not being loaded properly...?

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread Brian McCallister
Are the repository xml files all in WEB-INF/classes/ as well? -Brian On Jun 23, 2004, at 4:12 PM, WHIRLYCOTT wrote: Actually, there is a default descriptor in my repository.xml file. I know that these files are well formed and contain valid information because I'm using them as-is within my dev

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread WHIRLYCOTT
Yes, they are. phil. Brian McCallister wrote: Are the repository xml files all in WEB-INF/classes/ as well? -Brian On Jun 23, 2004, at 4:12 PM, WHIRLYCOTT wrote: Actually, there is a default descriptor in my repository.xml file. I know that these files are well formed and contain valid information

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread WHIRLYCOTT
I just ran a little test here. I put some invalid markup at the beginning of my repository.xml file in order to see if I would get an error message about it not being parsed correctly, and I did. So it appears that the repository.xml file is being read. But this is quite puzzling, because my

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread Thomas Dudziak
WHIRLYCOTT wrote: I just ran a little test here. I put some invalid markup at the beginning of my repository.xml file in order to see if I would get an error message about it not being parsed correctly, and I did. So it appears that the repository.xml file is being read. But this is quite

Making OJB manage composite 1:n relationships (as opposed to aggregate)

2004-06-23 Thread Joe Germuska
In the case where a collection is a composite (in the UML sense), can OJB manage the details of that? More specifically: I have an object with a collection. If when I store the object, the members of the collection are different than what is in the database, I want the records in the database

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread WHIRLYCOTT
The pathnames below that point to the repository.xml file are correct. Apart from that, the error messages aren't very useful. Where do you keep your OJB.properties and repository.xml files? phil. INFO (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersistor : OJB

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread Thomas Dudziak
WHIRLYCOTT wrote: The pathnames below that point to the repository.xml file are correct. Apart from that, the error messages aren't very useful. Where do you keep your OJB.properties and repository.xml files? The place should be ok for both files. phil. INFO (2004-06-23) 17:17:25.094

Re: OJB + tomcat + OJB.properties

2004-06-23 Thread WHIRLYCOTT
I have this in my OJB.properties file: repositoryFile=repository.xml I purposely put some jibberish in the repository.xml file earlier on and I did indeed get an exception indicating that there was a problem reading the file. Based on this, I am assuming that the file is accessible and