Re: column name is a reserved keyword
hi oleg, ojb does not do escaping of column-names. so you have two possibilities 1.) change the offending column name 2.) find out what kind of syntax the jdbc-driver accepts have you tried single quotes 'print' ? jakob Oleg Lebedev wrote: Hi Jakob, Here is an exerpt from my repository.xml. table="webspec312.dbo.StudInfo" 'Print' is a reserved keyword in SQL Server. When I change the column name to StudInfo.Print, i.e. column="StudInfo.Print', I get the same error. If I use [Print] or "Print" as the column name, then my JDBC driver throws an error saying that "Column [Print] (or "Print") does not exist". Is there a way to force OJB to put column name in quotes or smth like that? Thanks. Oleg -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 10:03 AM To: OJB Users List Subject: Re: column name is a reserved keyword hi oleg, have you tried to change column names in repository.xml ? ojb would the use : select A0.[name], A0.firstName from person A0 jakob Oleg Lebedev wrote: Hi, I am changing an existing application to use OJB. The problem that I ran into is that some of the column names are reserved keywords, e.g. 'print'. I need to configure OJB to put all column names in brackets, e.g. [print], when retrieving values from the database. Otherwise, SQL Server throws a "Reserved keyword" exception. How do I do this? Thanks. Oleg * This e-mail may contain privileged or confidential material intended for the named recipient only. If you are not the named recipient, delete this message and all attachments. Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited. We reserve the right to monitor e-mail sent through our network. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This e-mail may contain privileged or confidential material intended for the named recipient only. If you are not the named recipient, delete this message and all attachments. Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited. We reserve the right to monitor e-mail sent through our network. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: delete relation in indirection-table
I'll ask a more fundamental question: Why is RemovalAwareCollection the default collection class for M:N relations? In my experience, it is extremely rare that you would want the auto delete behavior with M:N. It would seem more appropriate to change the default instead of having to document and educate everyone about the default behavior not being what they would reasonably expect. Thanks. Larry. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 04, 2004 9:08 AM > To: OJB Users List > Subject: Re: Re: delete relation in indirection-table > > As far as I remember, this behaviour was changed since 0.96 or 0.97 - I'm > not sure. > Of course, a DTD comment alerting that RemovalAwareCollection is default > is very welcome. > > And changes in DOCs, specially relative to M:N mapping, recommending to > not use default > value for collection-class IMHO is mandatory. > > > Edson Richter > > > > Hi all, > > > > Nope I didn't found any thing on the subject, I found this behaviour > while debugging ojb ( > > thank to eclipse ). And then reading comment in example bundled with > ojb. > > Same behaviour with all ( I played with ) layer ( odmg, PB ). > > > > It's should be documented AND specified that default collection class > is > > RemovalAwareCollection ... > > > > Really happy to give ( this insignifiant ... ) help > > AND many many many thank for ojb, document in general is very well > done. > > > >> Message du 04/03/04 10:24 > >> De : Armin Waibel <[EMAIL PROTECTED]> > >> A : OJB Users List <[EMAIL PROTECTED]> > >> Copie à : > >> Objet : Re: delete relation in indirection-table > >> > >> Hi all, > >> > >> is this behaviour documented? > >> > >> regards, > >> Armin > >> > >> Klaus Ripplinger wrote: > >> > Hi Olivier, Hi Edson, > >> > > >> > using MangeableVector solved the problem! > >> > thanks a lot! > >> > > > You're very welcome ! > >> > Klaus > >> > > >> > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Create table based on repository.xml information
Hi. I have an existing database and I am using a plug-in to generate repository.xml file for all the tables in this database. Now, I want to be able to connect to a different database via OJB and create the same tables based on the repository.xml. Is it possible to drop/create a table based on the repository.xml data using OJB? Thanks. Oleg * This e-mail may contain privileged or confidential material intended for the named recipient only. If you are not the named recipient, delete this message and all attachments. Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited. We reserve the right to monitor e-mail sent through our network. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: column name is a reserved keyword
Hi Jakob, Here is an exerpt from my repository.xml. 'Print' is a reserved keyword in SQL Server. When I change the column name to StudInfo.Print, i.e. column="StudInfo.Print', I get the same error. If I use [Print] or "Print" as the column name, then my JDBC driver throws an error saying that "Column [Print] (or "Print") does not exist". Is there a way to force OJB to put column name in quotes or smth like that? Thanks. Oleg -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 10:03 AM To: OJB Users List Subject: Re: column name is a reserved keyword hi oleg, have you tried to change column names in repository.xml ? ojb would the use : select A0.[name], A0.firstName from person A0 jakob Oleg Lebedev wrote: > Hi, > > I am changing an existing application to use OJB. > The problem that I ran into is that some of the column names are > reserved keywords, e.g. 'print'. I need to configure OJB to put all > column names in brackets, e.g. [print], when retrieving values from > the database. Otherwise, SQL Server throws a "Reserved keyword" > exception. > > How do I do this? > > Thanks. > > Oleg > > * > This e-mail may contain privileged or confidential material intended for the named recipient only. > If you are not the named recipient, delete this message and all attachments. > Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited. > We reserve the right to monitor e-mail sent through our network. > * > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This e-mail may contain privileged or confidential material intended for the named recipient only. If you are not the named recipient, delete this message and all attachments. Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited. We reserve the right to monitor e-mail sent through our network. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem deploying application in JBoss
sorry I forget, 'ant prepare-jboss jar' should still work in latest CVS. Armin Armin Waibel wrote: Hi Peter, Peter Wieland wrote: Hi, just a small question related to OJB and JBoss. I am trying to change from OJB rc4 to the lates version froom CVS. Things seem to work well on the client side, but I have difficulties on the server side. Deployment of my application fails with due to missing classes org.apache.ojb.jboss.PBFactory and org.apache.ojb.jboss.ODMGFactory which were present in rc4 but are absent in rc5 and in CVS HEAD. I found the source in a separate dir (src/connector) but the classes are'n build. My question: Are these classes obsolete and if this is the case, which classes do I need to use instead? Otherwise, how can I tell OJB during build to include the jboss specific classes? In rc5 these classes are not obsolete to run the the ejb-examples, but they are not part of OJB jar. These classes only for showing how to make OJB accessible via JNDI in JBoss. If you are using the source distribution call 'ant prepare-jboss jar' to copy these classes to OJB source trunk and build the OJB jar with these JBoss mbean classes. In upcoming release these classes no longer used in ejb-examples. Instead of using a JNDI lookup to get instance of the OJB api main classes, we use these classes directly in the examples beans. regards, Armin Thanx for your help, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem deploying application in JBoss
Hi Peter, Peter Wieland wrote: Hi, just a small question related to OJB and JBoss. I am trying to change from OJB rc4 to the lates version froom CVS. Things seem to work well on the client side, but I have difficulties on the server side. Deployment of my application fails with due to missing classes org.apache.ojb.jboss.PBFactory and org.apache.ojb.jboss.ODMGFactory which were present in rc4 but are absent in rc5 and in CVS HEAD. I found the source in a separate dir (src/connector) but the classes are'n build. My question: Are these classes obsolete and if this is the case, which classes do I need to use instead? Otherwise, how can I tell OJB during build to include the jboss specific classes? In rc5 these classes are not obsolete to run the the ejb-examples, but they are not part of OJB jar. These classes only for showing how to make OJB accessible via JNDI in JBoss. If you are using the source distribution call 'ant prepare-jboss jar' to copy these classes to OJB source trunk and build the OJB jar with these JBoss mbean classes. In upcoming release these classes no longer used in ejb-examples. Instead of using a JNDI lookup to get instance of the OJB api main classes, we use these classes directly in the examples beans. regards, Armin Thanx for your help, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: column name is a reserved keyword
hi oleg, have you tried to change column names in repository.xml ? ojb would the use : select A0.[name], A0.firstName from person A0 jakob Oleg Lebedev wrote: Hi, I am changing an existing application to use OJB. The problem that I ran into is that some of the column names are reserved keywords, e.g. 'print'. I need to configure OJB to put all column names in brackets, e.g. [print], when retrieving values from the database. Otherwise, SQL Server throws a "Reserved keyword" exception. How do I do this? Thanks. Oleg * This e-mail may contain privileged or confidential material intended for the named recipient only. If you are not the named recipient, delete this message and all attachments. Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited. We reserve the right to monitor e-mail sent through our network. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Possible circular reference BUG
Refresh="true" tells OJB to refresh the reference (or collection) from the database. So if you have a cyclical object graph and you make all your reference and collection descriptors refresh=true, you have configured OJB to create an infinite loop. Remove the refresh attribute on at least one node of the object graph cycle. Wally -Original Message- From: Nadir Timanga [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 10:32 AM To: [EMAIL PROTECTED] Subject: RE: Possible circular reference BUG Hye, Thanks for your quick reply. I'm using default cache implementation and I always map references and collections using the following syntax: <> <...> Thanks, Nadir >From: Mahler Thomas <[EMAIL PROTECTED]> >Reply-To: "OJB Users List" <[EMAIL PROTECTED]> >To: "'OJB Users List'" <[EMAIL PROTECTED]> >Subject: RE: Possible circular reference BUG >Date: Fri, 5 Mar 2004 16:29:27 +0100 > >Which cache implementation are you using? >how are your reference- and collection-descriptors defined? > >Thomas > > > -Original Message- > > From: Nadir Timanga [mailto:[EMAIL PROTECTED] > > Sent: Friday, March 05, 2004 3:56 PM > > To: [EMAIL PROTECTED] > > Subject: Possible circular reference BUG > > > > > > Hye, > > I'm using PB API and I'm getting stack overflow when I have the > > following > > associations: > > > > A -> B -> C -> A > > > > P.S.: "X -> Y" means X has one or more references to Y > > > > Thanks, > > Nadir > > > > _ > > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > > http://join.msn.com/?page=features/junkmail > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Extent problem with ODMG
hi steve, i'm happy it solved your problem. you can define relationships or fields in any class-descriptor, abstract or concrete. in your case you need it in the abstract because of A pointing to S. but if you would query for all B or C pointing to a D (ie. D.name) then the definition in concrete B and D are used. i admit it would be easier if ojb would support inheritence of descriptors. but that's another story. jakob Steve Clark wrote: This did indeed solve the problem. In summary, repository.xml has: - Foreign key field defined in subclasses only - Relationship defined in subclasses and in superclass And in Java the relationship accessors are defined in the superclass only. I didn't even know that one could put fields or relationships in the superclass in repository.xml. Thanks for pointing this out, Jakob! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem deploying application in JBoss
Hi, just a small question related to OJB and JBoss. I am trying to change from OJB rc4 to the lates version froom CVS. Things seem to work well on the client side, but I have difficulties on the server side. Deployment of my application fails with due to missing classes org.apache.ojb.jboss.PBFactory and org.apache.ojb.jboss.ODMGFactory which were present in rc4 but are absent in rc5 and in CVS HEAD. I found the source in a separate dir (src/connector) but the classes are'n build. My question: Are these classes obsolete and if this is the case, which classes do I need to use instead? Otherwise, how can I tell OJB during build to include the jboss specific classes? Thanx for your help, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Possible circular reference BUG
Hye, Thanks for your quick reply. I'm using default cache implementation and I always map references and collections using the following syntax: <> <...> Thanks, Nadir From: Mahler Thomas <[EMAIL PROTECTED]> Reply-To: "OJB Users List" <[EMAIL PROTECTED]> To: "'OJB Users List'" <[EMAIL PROTECTED]> Subject: RE: Possible circular reference BUG Date: Fri, 5 Mar 2004 16:29:27 +0100 Which cache implementation are you using? how are your reference- and collection-descriptors defined? Thomas > -Original Message- > From: Nadir Timanga [mailto:[EMAIL PROTECTED] > Sent: Friday, March 05, 2004 3:56 PM > To: [EMAIL PROTECTED] > Subject: Possible circular reference BUG > > > Hye, >I'm using PB API and I'm getting stack overflow when I > have the following > associations: > >A -> B -> C -> A > > P.S.: "X -> Y" means X has one or more references to Y > > Thanks, > Nadir > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
subqueries: doc
Hi all, I was wondering if someone could write up something to explain the use of subqueries. I'm deciphering the relevant PB test cases at the moment and can probably figure it out, but it looks like an important gap in the documentation. Thanks, Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Possible circular reference BUG
Which cache implementation are you using? how are your reference- and collection-descriptors defined? Thomas > -Original Message- > From: Nadir Timanga [mailto:[EMAIL PROTECTED] > Sent: Friday, March 05, 2004 3:56 PM > To: [EMAIL PROTECTED] > Subject: Possible circular reference BUG > > > Hye, > I'm using PB API and I'm getting stack overflow when I > have the following > associations: > > A -> B -> C -> A > > P.S.: "X -> Y" means X has one or more references to Y > > Thanks, > Nadir > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pbm M-TO-N relation delete
Hello All I have a strange behaviour of a MtoN relation mapping when i try to delete something . The relation is something like this A <-> B <-> C And his mapped like this : My pbm is the following . When I change an element of A_Class and remove some links on C_Class , the C_Class element are Also removed. This happen only when I set the proxy value to true. Looking in the code quicly : may be there is a pbm in the list Proxy which has a RemovalAwareCollection which is removing object after the remove of the MtoN relation . May be my mapping is wrong or may be the pbm is already corrected ...in this case sorry . B.R Thierry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible circular reference BUG
Hye, I'm using PB API and I'm getting stack overflow when I have the following associations: A -> B -> C -> A P.S.: "X -> Y" means X has one or more references to Y Thanks, Nadir _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible OJB RC5 inheritance bug
Hye, I'm using OJB RC5 (not CVS head), and I'm getting strange behaviours when I use inheritance. Here's my repository mapping: In my database (mysql), I have 2 rows for SuperCar in SUPER_CAR table and 2 rows for HiperCar in HIPER_CAR table. I'm using PB API and when I read the User object, the list of objects materialized in simpleCars collection is 4 SuperCars or 4 Hipercars instead of 2 Supercars + 2 HiperCars. Thanks, Nadir _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OTM] can not delete from dependent collection
Oleg Nitz ukr.net> writes: > Hi Joerg, > > I have fixed this issue too. You are extremely productive tester! Necessarily. We chose OTM for our application and I have to get it working. Furthermore the good test covering of OJB helps much. We would be glad if we were that good at Cocoon. And when you get everything fixed in hours/days it makes nearly fun :) > > My persons have a name, changing this one and making this change persistent > > does not update the database. After makePersistent(debitor) it contains > > again the original form, just like as it was not touched. The same happened > > for me for the addresses, changes on them are not saved (both removing and > > adding to an existing list and changing entries on a specific address). I'm quite happy at the moment. Thanks again. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Concurrent access to HashMap in RsIterator
I've got an app using OJB. It works fine on Windows (all my descriptors are OK and datasource config too) but when I deploy on AIX I've got this error : org.apache.ojb.broker.PersistenceBrokerException: java.util.NoSuchElementException: Could not obtain next object: concurrent access to HashMap attempted by Thread[http8080-Processor2,5,main] at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)(Compiled Code) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)(Compiled Code) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown Source)(Compiled Code) at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown Source)(Compiled Code) at org.apache.ojb.odmg.oql.OQLQueryImpl.execute(Unknown Source)(Compiled Code) ... Caused by: java.util.NoSuchElementException: Could not obtain next object: concurrent access to HashMap attempted by Thread[http8080-Processor2,5,main] at org.apache.ojb.broker.accesslayer.RsIterator.next(Unknown Source)(Compiled Code) at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)(Compiled Code) ... 45 more Does someone knows the source of this problem ?