Re: GroupBy clause ignored in PersistentBroker.getCount( Query query)

2004-02-12 Thread Danilo Tommasina
hi jakob, sorry my knowledge of the OJB internals is not good enough and i am a bit short of time for investigating further, sorry (i am just an OJB user) I guess that this thread should be discussed further in the developer mailing list... cheers danilo hi danilo, the distinct stuff works f

[Fwd: persistence broker]

2004-02-12 Thread Thomas Mahler
Original Message Subject: persistence broker Date: Thu, 12 Feb 2004 15:33:15 -0600 From: MORRIS, JAMES (CONTRACTOR) <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Thomas, Is there any way to release a single instance of a persistence broker that has been closed? I see the relea

Query by Criteria for Reference Object?

2004-02-12 Thread Joe Germuska
In my object model, I have a type "Template" which has a reference to another type, "Size". I want to find all templates which have a specific "Size" I expected this to work: crit.addEqualTo("size", template.getSize()); but it didn't, apparently because there is no FieldDescriptor for

RC5 and cyclic references PROBLEM

2004-02-12 Thread Stuart Heriot
G'day, I've been testing rc5 and am seeing some unexpected behaviour with regard cyclic references (eg. ClassA contains a collection of ClassB ojbects. ClassB contains a reference to a ClassA object. We have been running with rc4 ok but when we run with rc5, same code same repository, it does n

Connection pooling and HSQL

2004-02-12 Thread Kollivakkam R. Raghavan
I am using OJB with HSQL and the following connection descriptor in a Struts based web application. I very frequently see a message saying that the connection was closed and destroy object was called. It appears as if the connection pooling is not working as it should. Am I missing a setting - o

Re: XSD to Repository.xml or Torque.xml

2004-02-12 Thread Brian McCallister
If I were going to do it I would probably start with XMLBeans and use the bean property setters for populating values... but haven't done it. If I had data with a defined xml schema I would probably be looking to store it in an xml database -- though those are of limited supply at the moment (i

Re: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Gus Heck
Gus Heck wrote: Armin Waibel wrote: Hi again, Guillaume Nodet wrote: Maybe using the Identity object's 'equals' method should solve the problem. hmm, Identity should be ok, but it's much more costly than using object identity in this case. I don't think the point here is on business objects

Re: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Gus Heck
Armin Waibel wrote: Hi again, Guillaume Nodet wrote: Maybe using the Identity object's 'equals' method should solve the problem. hmm, Identity should be ok, but it's much more costly than using object identity in this case. I don't think the point here is on business objects equality. The p

XSD to Repository.xml or Torque.xml

2004-02-12 Thread David Hooker
I'm possibly about to work on something to transform an XSD into a Torque database schema XML file (and from there, Torque can generate a respository.xml), and was wondering if anyone has done something like this already. I've already generated my Java objects from the XSD, using Castor. I'm ba

Delete object in 1-N relationship not setting referencing objects to null

2004-02-12 Thread edson . richter
Hi! I have a new situation in my project. I've an object that is referenced by other objects. The relationship is 1->N. When I delete the Object in 1 side, and the auto-delete if false, then I expect the N side object should be set to null in referencing field. This is not happening. Is this a

Re: XDoclet LONGVARCHAR MySQL wrong column definition

2004-02-12 Thread Joris Wijlens
Excellent, That did the job, thanks for the quick fix. Joris - Original Message - From: "Thomas Dudziak" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Thursday, February 12, 2004 3:36 PM Subject: Re: XDoclet LONGVARCHAR MySQL wrong column definition > On Thu, 12 F

Re: Cache Bug with multiple PersistenceBrokers?

2004-02-12 Thread Armin Waibel
Hi Tino, Tino Schöllhorn wrote: Hello Armin, I just found another thread which has the same topic. There you mentioned that it is possible to define different threads for each connection-descriptor. So if I declared something like ... ... then everything would behave as one might

Re: GroupBy clause ignored in PersistentBroker.getCount( Query query)

2004-02-12 Thread Jakob Braeuchi
hi danilo, the distinct stuff works for single and multiple pk : select count(distinct key1 || key2) this is platform dependent of course. but the big problem i have now is the handling (translation)of the multi columns during sql generation. the current implementation assumes that there's onl

Re: Cache Bug with multiple PersistenceBrokers?

2004-02-12 Thread Tino Schöllhorn
Hello Armin, I just found another thread which has the same topic. There you mentioned that it is possible to define different threads for each connection-descriptor. So if I declared something like ... ... then everything would behave as one might expect? would'nt it? Tino Armin W

Re: Cache Bug with multiple PersistenceBrokers?

2004-02-12 Thread Armin Waibel
Hi Tino, Tino Schöllhorn wrote: Hi, I have a very, very strange phenomenom: I have one web-application which handles several clients. Each client uses its own database, but the database schema is always the same. Our web-application handles requests for all clients, so I have to switch the Pe

Cache Bug with multiple PersistenceBrokers?

2004-02-12 Thread Tino Schöllhorn
Hi, I have a very, very strange phenomenom: I have one web-application which handles several clients. Each client uses its own database, but the database schema is always the same. Our web-application handles requests for all clients, so I have to switch the PersistenceBroker as soon as I noti

RE: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Guillaume Nodet
Hi, > > What are the problems? If we delete the same object twice or more (same > PK, but different instances), nothing should happend. > When we store different instances with same PK, first time an insert > will happend, all further instances cause an update. > Do I overlook a fault? > I th

Re: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Armin Waibel
Hi again, Guillaume Nodet wrote: Maybe using the Identity object's 'equals' method should solve the problem. hmm, Identity should be ok, but it's much more costly than using object identity in this case. I don't think the point here is on business objects equality. The point is to know if the

Re: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Larry V. Streepy, Jr.
Ahh, so the right thing to do would be to compare the Identity of each object in the list, and not rely on the equals() method. Thanks for clarifying. Larry. Armin Waibel wrote: Hi Larry, Larry V. Streepy, Jr. wrote: As I think about this thread, I'm beginning to wonder about the consequences

RE: reverse-db

2004-02-12 Thread Yerra Kalyani
When you downloaded the OJB you have it. You can run it by using the ANT At the command prompt C:\OJB>ant reverse-db then a GUI Client launches and you will be a happy camper. Thanks, Kalyani -Original Message- From: Muhammad Aamir [mailto

Re: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Armin Waibel
Hi Larry, Larry V. Streepy, Jr. wrote: As I think about this thread, I'm beginning to wonder about the consequences of the changes being proposed. The essence of the problem revolves around the equality of business objects. The problem was that the equals() method returns true, even when the

RE: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Guillaume Nodet
Maybe using the Identity object's 'equals' method should solve the problem. I don't think the point here is on business objects equality. The point is to know if the object ojb is storing or deleting has already been processed or not for a given object graph. This can only be the case if the prima

Re: Bug in AbstractSequenceManager found!!

2004-02-12 Thread Armin Waibel
Hi Andrew, Clute, Andrew wrote: Armin, First off, yes, it does work. Thanks! Feel free to commit to CVS. cool, so I will do a check in Second, I want to apologize. I get frustrated with people at my work that don't attempt to solve their own problems, and it seems that I did the same thing to

RE: Bug in AbstractSequenceManager found!!

2004-02-12 Thread Brendan Richards
I had this exact same problem which I fixed with an identical piece of code. Huge apologies for not posting it but I'm pretty new to ojb and was working with release rather than CVS code... I've pulled the new file from cvs and can confirm that it works fine with jrun / MS SQL using Macromedia's

Re: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Larry V. Streepy, Jr.
As I think about this thread, I'm beginning to wonder about the consequences of the changes being proposed. The essence of the problem revolves around the equality of business objects. The problem was that the equals() method returns true, even when they have different primary keys. This mea

Re: Xdoclet: Why the default size of 24 on VARCHAR's in the new version?

2004-02-12 Thread Thomas Dudziak
On Thu, 12 Feb 2004, Clute, Andrew wrote: > I see in the documentation, and the new build of my repository file from > the 1.2 Release of the OJB Xdoclet module, that if you do not specify a > length for your varchar's, it defaults to a value of 24. > > Why was this change necessary? I see that i

Re: Bug in doDelete with the markedForDelete list

2004-02-12 Thread Armin Waibel
Hi, Guillaume Nodet wrote: Armin, I dit not see any identity based List. There are Maps (in the jarakarta-commons-collections for exemple) and a Set could be easily build on top of this map. Maybe just inlining the contains function directly in the doDelete function, walking through the array sho

RE: Bug in AbstractSequenceManager found!!

2004-02-12 Thread Clute, Andrew
Armin, First off, yes, it does work. Thanks! Feel free to commit to CVS. Second, I want to apologize. I get frustrated with people at my work that don't attempt to solve their own problems, and it seems that I did the same thing to you. I was on my way out the door from work yesterday when this c

Xdoclet: Why the default size of 24 on VARCHAR's in the new version?

2004-02-12 Thread Clute, Andrew
I see in the documentation, and the new build of my repository file from the 1.2 Release of the OJB Xdoclet module, that if you do not specify a length for your varchar's, it defaults to a value of 24. Why was this change necessary? I see that it says because of MySQL that it now defaults to that,

Re: java.lang.ExceptionInInitializerError using OJB with Struts

2004-02-12 Thread Bilge (Erkan) Yuceer
Dear Armin, The problem is solved, and the reason was very strange. I was editing the jdbc-type with capital letters as seen below. Then I tried to wirte it in small letters as "integer", and it worked. I guess it is something to do with the capital "I" letter. In Turkish the capital of "i" is

Re: XDoclet LONGVARCHAR MySQL wrong column definition

2004-02-12 Thread Thomas Dudziak
On Thu, 12 Feb 2004, Bergland wrote: > Hi all, > > I use the OJB XDoclet module that comes from the current CVS (few days ago) to > generate my OJB configuration files and SQL (I like it a lot). > > I have this attribute of type String that I want to store in a MySQL column that can > handle

Re: Problem with database connection

2004-02-12 Thread Armin Waibel
Hi, Hinnerk Feldwisch wrote: Hello altogether, I developed a jsp/struts/ojb- project which runs fine on my private server; but after approximately two days the database connection fails on the real server where the website shall be accessible. At the end I will post the error- message. Seems tha

XDoclet LONGVARCHAR MySQL wrong column definition

2004-02-12 Thread Bergland
Hi all, I use the OJB XDoclet module that comes from the current CVS (few days ago) to generate my OJB configuration files and SQL (I like it a lot). I have this attribute of type String that I want to store in a MySQL column that can handle large Strings (for example MEDIUMTEXT). I mapped the

RE: Problem with database connection

2004-02-12 Thread Brendan Richards
One way to setup your connection (if your running within a webapp context) is with a JNDI datasource. This can be setup using whatever pooled connections etc are available for your app server and just let ojb receive connections from this system. For example, I'm running Macromedia JRun with MS S

Problem with database connection

2004-02-12 Thread Hinnerk Feldwisch
Hello altogether, I developed a jsp/struts/ojb- project which runs fine on my private server; but after approximately two days the database connection fails on the real server where the website shall be accessible. At the end I will post the error- message. For me the problem seams to be that the

Re: reverse-db

2004-02-12 Thread Armin Waibel
Hi Muhammad, Muhammad Aamir wrote: I understand there is a tool to generate OJB mappings (repository.xml), named reverse-db ? From where can I download it ? It is included in OJB distro and can be started with bin\build.bat reverse-db or bin/build.sh reverse-db There are several tools support OJB

RE: OJB x Hibernate x Castor x ...

2004-02-12 Thread Marco \"Trink0\" Trincardi
Hi Andrade, i cant tell u what's the O/R Mapping tool that best feets your needs, but i can tell u why i've choose OJB for my application: - Opensource - Good comunity support - Support for the 3 flavors of Db i'm using (Mysql, Oracle, Hsqldb) - Support for standards (ODMG, JDO) - I'm not a JDO f

Re: JDO in JBoss?

2004-02-12 Thread A Leg
Thank's Armin I have been afraid for some long minutes but now it is OK. I use Pb on my side and it works OK. I will ot move to JDO before JDO get stabilized on sun and ojb sides. So it's all good! Best regards Andre Legendre Armin Waibel wrote: Hi Andre, A Leg wrote: Hello Does that mean

reverse-db

2004-02-12 Thread Muhammad Aamir
I understand there is a tool to generate OJB mappings (repository.xml), named reverse-db ? >From where can I download it ? Muhammad Aamir Senior Software Engineer Information Resource Dept. Karachi International Container Terminal Tel: (9221) 2316401-20 Fax: (9221) 2313816 E-mail: [EMAIL PRO

Re: JDO in JBoss?

2004-02-12 Thread Armin Waibel
Hi Andre, A Leg wrote: Hello Does that mean that it is no way to get ojb work with Jboss ? No, only the current JDO/Jdori based JDO-api implementation was not supported. PB-api and ODMG-api work since 0.9x Does that mean that it is no way to get ojb with any application server ? No, don't pani

Re: GroupBy clause ignored in PersistentBroker.getCount( Query query)

2004-02-12 Thread Danilo Tommasina
hi jakob, hi danilo, i propose to do the following : 1.) select count(*) for QueryByCriteria not using distinct ok! 2.) select count (distinct key1 || key2) for DISTINCT QueryByCriteria ok! if you can really make it db independant, you must probably add some sort 'generateConcat' method in