objectbridge-developers Mailing List for ObJectRelationalBridge (Page 15)
Brought to you by:
thma
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(33) |
Feb
(8) |
Mar
(3) |
Apr
(1) |
May
(18) |
Jun
(6) |
Jul
(15) |
Aug
(71) |
Sep
(29) |
Oct
(43) |
Nov
(77) |
Dec
(54) |
2002 |
Jan
(54) |
Feb
(147) |
Mar
(144) |
Apr
(163) |
May
(307) |
Jun
(240) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Hoang, H. <Hai...@co...> - 2002-05-20 19:40:58
|
1. I heard somewhere that OJB will be added to the Jakarta as a top-level project sometimes in the future and I'm wandering what is the progress on this? 2. OJB design and concept is closed to ATG's Repository. However ATG's Repository is very mature, scalable, and lot more features. I think OJB can learn a lot from ATG. For more information, go to atg.com. 3. Edit the repository.xml file is very times consuming. I would like to add some code that reverses the database schema and create the repository automatically. I am wandering if anyone has working on this area yet? |
From: Jakob B. <jbr...@ho...> - 2002-05-20 14:17:02
|
hi, i reworked the selection criteria hierarchy. it now looks as follows: SelectionCriteria - FieldCriteria (criteria using a field to compare with ie: name = outgoingEdges.sink.name) - ValueCriteria (criteria using a valueto compare with ie: name = "OJB") - ColumnCriteria (criteria using an untranslated column to compare with ie: name = T_PERSON.F_NAME) Field- and ValueCriteria support Equal, Greater, Less and their negative forms. in addition ValueCriteria still supports the old Between, In and Like. ColumnCriteria only support Equal and NotEqual. there are discussions about dropping ColumnCriteria completely. how does is affect your code: if you've used addEqualToColumn() you should change to addEqualToField(). currently there's no difference in the implementation and handling of EqualToFieldCriteria and EqualToColumn Criteria, but this may change in near future. regards jakob |
From: Oleg N. <on...@uk...> - 2002-05-19 22:39:34
|
Hi, Now GROUP BY is generated with column names again, as it was before I introduced SqlStatement which generated column numbers in GROUP BY. Since several databases don't support this syntax I returned names back. I tested this by running two junit tests separately, all looks okay. However I still get many exceptions when I run "build junit2" or "build junit" :( Regards, Oleg |
From: Oleg N. <on...@uk...> - 2002-05-19 20:59:32
|
On Sunday 19 May 2002 12:21, Jakob Braeuchi wrote: > hi oleg, > > > I agree with you that such method should be named addEqualToField rather > > that > > > addEqualToColumn. > > BTW, why there is no addGreaterThanColumn method, and so on? > > i'll add methods for above criteria. and i could also change > addEqualToColumn to addEqualToField . +1! Oleg. |
From: Matthew B. <ma...@so...> - 2002-05-19 19:18:11
|
Found there were some missing table definitions in the new torque stuff, and some mismatched types, but it works much better than the old stuff: Got these results: BROKER Tests run: 65, Failures: 1, Errors: 0, Time elapsed: 8.002 sec ODMG Tests run: 93, Failures: 0, Errors: 0, Time elapsed: 4.847 sec SODA Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.701 sec All repeatable (whew) running "ant junit2" I think we should remove the old db-setup stuff as soon as possible to avoid confusion, and having to maintain two completely different test setups that do the same thing. Can I remove references to old stuff? Btw -> check in /profile for the mssqldb.profile file for running ojb on MS SQL. I'll get an Oracle one together soon. Cheers, Matthew |
From: Matthew B. <ma...@so...> - 2002-05-19 18:38:08
|
I fixed a problem with the recursion avoidance scheme in TransactionImpl. I'm currently getting BROKER Tests run: 65, Failures: 7, Errors: 0, Time elapsed: 9.383 sec ODMG Tests run: 93, Failures: 4, Errors: 6, Time elapsed: 5.458 sec SODA Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.952 sec When running the ant junit2 target. I am seeing a lot of errors with the SQL Server driver like: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Operand type clash: varbinary is incompatible with text when running ant junit BROKER Tests run: 65, Failures: 10, Errors: 0, Time elapsed: 6.699 sec ODMG Tests run: 93, Failures: 3, Errors: 0, Time elapsed: 4.366 sec SODA Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.761 sec Which should I be using? Seems like we are in some sort of transitory period. I just reran junit and got: Tests run: 65, Failures: 19, Errors: 0, Time elapsed: 5.598 sec Tests run: 93, Failures: 3, Errors: 0, Time elapsed: 4.166 sec Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.761 sec Reran and got different results. I'm nuking the database between runs, and not changing anything else. I just ran and got 93/0/0 for odmg, at times it seems like a table is not being created properly: [junit] [DEFAULT] ERROR: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'MDTEST_DETAIL_FKINPK'. Although in the prior run, it did work. I'm not sure these are related to my changes. These seem test setup related. Thoughts? |
From: Thomas M. <tho...@ho...> - 2002-05-19 13:38:34
|
Hi Matthew, Oops, I see... This really should solve this issue. I think there are some other places where we'll need additional handling to avoid non-terminating recursions and other recursion related problems with circular object-nets. (e.g. in PB.store(obj) or in PB.delete(obj)) cheers, Thomas Matthew Baird wrote: > Hi Thomas, > > I solved this problem by doing this: > > private void lockReferences(ClassDescriptor cld, Object newTxObject, int > lockMode) > throws IllegalAccessException, PersistenceBrokerException > { > registeredForLock.put(newTxObject, newTxObject); > Iterator i = cld.getObjectReferenceDescriptors().iterator(); > while (i.hasNext()) > { > ObjectReferenceDescriptor rds = > (ObjectReferenceDescriptor) i.next(); > Object refObj = > rds.getPersistentField().get(newTxObject); > if (refObj != null) > { > if (registeredForLock.containsKey(refObj)) > { > ; //nuttin > } > else > { > lock(refObj, lockMode); > } > } > } > } > > basically, I maintain another map of objects that are currently being locked > (different than the registration). Then I register the newTxObject in the > map at the beginning, and as I iterate through the reference descriptors, if > I hit one that is already in play for locking, I just ignore it. It works > for my test cases, but I wanted to make sure you didn't think this was a bad > solution. > > Overall, I don't think there are a lot of people using the ODMG interfaces. > > > > -----Original Message----- > From: Thomas Mahler [mailto:tho...@ho...] > Sent: Monday, May 13, 2002 1:08 AM > To: Matthew Baird > Subject: Re: FW: [OJB-developers] recursive dependency with ODMG > > I'll have a look at it ! > > cu, > > Thomas > > Matthew Baird wrote: > > >> <<OneToOneTest.zip>> >>could you take a look at this problem? >> >>both joachim and i are having trouble because of it :( >> >>-----Original Message----- >>From: Joa...@tp... >>To: Matthew Baird >>Sent: 5/8/02 1:35 AM >>Subject: RE: [OJB-developers] recursive dependency with ODMG >> >>Hy, >> >>Here's the test-case. >> >> >> >>regards >>Joachim Sauer >> <<OneToOneTest.zip>> >> >> > > > > |
From: Thomas M. <tho...@ho...> - 2002-05-19 12:58:29
|
Hi Chris, I had a look at your new ContentHandler stuf. I like it, as it has a much better design as than my old monolithic XmlRepositoryHandler with its giant switch statement. I'm currently restructuring the repository.dtd. To reduce my work I won't touch your ContentHandler stuff in this iteration. Thus we will have to patch it after all my changes are checked in. I see the following issues: - The ContentHandler classes don't use the Classes RepositoryElements and RepositoryTags that define all syntactic tokens used by the OJB repository.dtd but use their own declarations. This should be changed. - No comments and licence statements yet. must me added. - The code has some uncritical references to classes (com.demandsolutions.*) not part of OJB. these should be removed. I think the best think is to wait until my current iteration on the repository.dtd is finished. I will inform you when I'm done. cheers, Thomas |
From: Thomas M. <tho...@ho...> - 2002-05-19 12:44:13
|
Hi Jakob, Jakob Braeuchi wrote: > hi thomas, > > i'm really sorry if i messed up the tags. i synched with the repository and > had a mismatch between tags in dtd and in RepositoryTags, > so i 'fixed' it. now i know what the problem was: the > jdbc-connection-descriptors of all but hsqldb still use the old tags :( > That was my fault ! I changed the default entry only. There is now all this new Maven stuff with variables like "@DBMS_NAME@". It assumed this is working for all platforms now ?! sorry from my side too! Thomas > sorry > jakob > > ----- Original Message ----- > From: "Thomas Mahler" <tho...@ho...> > To: "Matthew Baird" <ma...@so...> > Cc: <obj...@li...> > Sent: Saturday, May 18, 2002 5:07 PM > Subject: Re: [OJB-developers] bad checkin? > > > >>Hi Matthew, hi Jakob, >> >>Matthew Baird wrote: >> >> > Looks like someone forgot to checkin some conversions stuff in metadata >> > package. Please fix (you know who you are ;)) >> > Hi Matthew, hi Jakob, >> >> >>Mhh, I just checked my changes with the CVS on SF. All my recent changes >>are there! >> >>I changed the conversion stuff as follows: conversions are no longer >>defined per class but per attribute. This allows to reuse predefined >>conversions much better. >> >>There is also a new package ojb.broker.accesslayer.conversions >>containing the new stuff. >> >>I also checked in all necessary changes to the metadata layer and to the >>repository.dtd. (I did *not* change the new ContentHandler stuff to >>reflect the new grammar.) >> >>Unfortunately Jakob overwrote my changes to RepositoryTags.java. >> But my changes are in sync with the new repository grammar! SO I will >>check them in again. >> >>I started with the long awaited clean-up of the repository grammar. >>There will come more changes to the grammar in the next days! >>This may cause some inconvienience, but we will be rewarded with a much >>more homogenous and readable repository grammar. >> >>cu, >> >>Thomas >> >> >> > Thanks, >> > m >> > > _______________________________________________________________ >> > Hundreds of nodes, one monster rendering program. >> > Now that's a super model! Visit http://clustering.foundries.sf.net/ >> > > _______________________________________________ >> > Objectbridge-developers mailing list >> > Obj...@li... >> > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >> > > > > >> >> >> >>_______________________________________________________________ >>Hundreds of nodes, one monster rendering program. >>Now that's a super model! Visit http://clustering.foundries.sf.net/ >> >>_______________________________________________ >>Objectbridge-developers mailing list >>Obj...@li... >>https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >> >> > > > |
From: Jakob B. <jbr...@ho...> - 2002-05-19 12:01:14
|
hi matthew, i run all tests with your new checkin and there's a problem with testGetPKEnumerationByConstraints() of class PersistenceBrokerTest. this tests fails when calling broker store() because the connection is closed in releaseDbResources() of class PkEnumeration. jakob ----- Original Message ----- From: "Matthew Baird" <ma...@so...> To: "'Thomas Mahler'" <tho...@ho...>; <obj...@li...> Sent: Saturday, May 18, 2002 9:58 PM Subject: [OJB-developers] Big checkin > I just finished my big checkin. > > I did test, but I will admit I'm very new at CVS, so I hope I didn't mess > anything up in the checkin process. I tried to be very careful. If you > notice problems, let me know and I'll be available to fix them very quickly. > > Thanks, > Matthew > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Jakob B. <jbr...@ho...> - 2002-05-19 09:16:23
|
hi oleg, > I agree with you that such method should be named addEqualToField rather that > addEqualToColumn. > BTW, why there is no addGreaterThanColumn method, and so on? i'll add methods for above criteria. and i could also change addEqualToColumn to addEqualToField . jakob ----- Original Message ----- From: "Oleg Nitz" <on...@uk...> To: <obj...@li...> Sent: Sunday, May 19, 2002 12:09 AM Subject: Re: [OJB-developers] EqualToColumnCriteria an Aliases > Hi Jakob, > > On Saturday 18 May 2002 10:09, Jakob Braeuchi wrote: > > > the column name translation should be performed only in SqlStatment and > > > SqlGenerator. Do you agree? > > > > definitely yes. > > > > EqualToColumnCriteria is a special case because it explicetely uses the > > column name (_not_ the field name) on the right side of =. > > this column name should imho not be translated. > > i'm not shure about the left side of =. if EqualToColumnCriteria is only > > used in MtoNCriteria we could leave the column names on both sides > > untranslated. > 1) EqualToColumnCriteria can be created without MtoNCriteria via > Criteria.addEqualToColumn(). In this case I believe that the field name > should be used rather than column name, user shouldn't use column names in > Java code at all, they should appear once in repository.xml. > I agree with you that such method should be named addEqualToField rather that > addEqualToColumn. > BTW, why there is no addGreaterThanColumn method, and so on? > > 2) I believe that MtoNCriteria should be refactored, maybe even removed, but > I haven't looked into this issue deeply yet. SqlStatement is able to handle > M:N relations and there are testcases showing that, so there is absolutely > no need to do this work twice and to introduce MtoNCriteria for that, and > then to process MtoNCriteria as a very special case in SqlStatement. > > > what we definitely need to translate is an optional table name (ie. > > T_PERSON.FNAME ) here T_PERSON should be replaced by the alias leading to > > A0.FNAME. > There is no 1:1 mapping between table names and aliases, one table may appear > several times with different aliases. > > Regards, > Oleg > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Jakob B. <jbr...@ho...> - 2002-05-19 09:11:49
|
hi thomas, i'm really sorry if i messed up the tags. i synched with the repository and had a mismatch between tags in dtd and in RepositoryTags, so i 'fixed' it. now i know what the problem was: the jdbc-connection-descriptors of all but hsqldb still use the old tags :( sorry jakob ----- Original Message ----- From: "Thomas Mahler" <tho...@ho...> To: "Matthew Baird" <ma...@so...> Cc: <obj...@li...> Sent: Saturday, May 18, 2002 5:07 PM Subject: Re: [OJB-developers] bad checkin? > Hi Matthew, hi Jakob, > > Matthew Baird wrote: > > > Looks like someone forgot to checkin some conversions stuff in metadata > > package. Please fix (you know who you are ;)) > > Hi Matthew, hi Jakob, > > > Mhh, I just checked my changes with the CVS on SF. All my recent changes > are there! > > I changed the conversion stuff as follows: conversions are no longer > defined per class but per attribute. This allows to reuse predefined > conversions much better. > > There is also a new package ojb.broker.accesslayer.conversions > containing the new stuff. > > I also checked in all necessary changes to the metadata layer and to the > repository.dtd. (I did *not* change the new ContentHandler stuff to > reflect the new grammar.) > > Unfortunately Jakob overwrote my changes to RepositoryTags.java. > But my changes are in sync with the new repository grammar! SO I will > check them in again. > > I started with the long awaited clean-up of the repository grammar. > There will come more changes to the grammar in the next days! > This may cause some inconvienience, but we will be rewarded with a much > more homogenous and readable repository grammar. > > cu, > > Thomas > > > > Thanks, > > m > > > _______________________________________________________________ > > Hundreds of nodes, one monster rendering program. > > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > > > > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: <cn_...@ya...> - 2002-05-19 09:09:12
|
String oql = "select licenses from " + license.getClass().getName() + " where ownerId=\"" + sl.getOwner().getId() + "\" and status=\"" + License.ACTIVE + "\" and $678 between startTime and endTime"; OQLQuery query = getEngine().newOQLQuery(); DList licenses = null; try{ query.create(oql); query.bind(Calendar.getInstance().getTime()); licenses = (DList)query.execute(); }catch(QueryException e){ e.printStackTrace(); return false; } output: [junit] aa contain bb is: true [junit] bb contain cc is: false [junit] .[BOOT] INFO: OJB.properties: file:/C:/jakarta-tomcat-4.0.3/webapps/ corpforge/WEB-INF/classes/OJB.properties [junit] [BOOT] INFO: loading XML took 280 msecs [junit] line 1: unexpected token: and [junit] E [junit] Time: 2.243 [junit] There was 1 error: [junit] 1) testMethods(test.com.corpforge.mall.mirage.SimpleLicenseManagerTe st) [junit] java.lang.NullPointerException [junit] at ojb.odmg.oql.OQLQueryImpl.create(Unknown Source) [junit] at com.corpforge.mall.mirage.SimpleLicenseManager.isValid(Unknow n Source) [junit] at test.com.corpforge.mall.mirage.SimpleLicenseManagerTest.testM ethods(Unknown Source) [junit] [junit] FAILURES!!! _________________________________________________________ Do You Yahoo!? 摊开你的掌心 让我看看你 http://sweepstakes.yahoo.com/2002cnuser |
From: <cn_...@ya...> - 2002-05-19 07:56:43
|
<!-- Mapping of User defined classes starts here --> <!-- Please keep user defined mappings in this file only, to avoid mixing user defined and system mappings. --> <!-- Mapping of User defined classes ends here --> <ClassDescriptor id="1"> <class.name>com.tt.mall.mirage.SimpleLicense</class.name> <table.name>license</table.name> <FieldDescriptor id="1"> <field.name>distributorId</field.name> <column.name>distributor_id</column.name> <jdbc_type>VARCHAR</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> <FieldDescriptor id="2"> <field.name>ownerId</field.name> <column.name>owner_id</column.name> <jdbc_type>VARCHAR</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> <FieldDescriptor id="3"> <field.name>domainId</field.name> <column.name>domain_Id</column.name> <jdbc_type>VARCHAR</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> <FieldDescriptor id="4"> <field.name>status</field.name> <column.name>status</column.name> <jdbc_type>VARCHAR</jdbc_type> </FieldDescriptor> <FieldDescriptor id="5"> <field.name>startTime</field.name> <column.name>start_time</column.name> <jdbc_type>DATE</jdbc_type> </FieldDescriptor> <FieldDescriptor id="6"> <field.name>endTime</field.name> <column.name>end_time</column.name> <jdbc_type>DATE</jdbc_type> </FieldDescriptor> </ClassDescriptor> Date curDate = Calendar.getInstance().getTime(); String oql = "select license from " + license.getClass().getName() + " where " + curDate + " between startTime and endTime"; ... i want to express like sql: String sql = "select * from license where date_format('" + new SimpleDateFormat("yyyy-mm-dd",curDate) + "','%y-%M-%d') between startTime and endTime"; i don't know how to use a java.util.Date object and between clause in oql... anyone tell me oql manual appreciate... _________________________________________________________ Do You Yahoo!? 摊开你的掌心 让我看看你 http://sweepstakes.yahoo.com/2002cnuser |
From: Matthew B. <ma...@so...> - 2002-05-18 22:09:45
|
Here are the preliminary instructions on using OJB inside JBoss: In the jboss.jcml (jboss 2) or jboss-service.xml (jboss 3) 1. Add the following MBean declaration <mbean code="org.jboss.odmg.ojb.ODMGImpl" name="DefaultDomain:service=ODMG,name=@bindname@"> <attribute name="Configuration">file:PATHTOOJB/OJB.properties</attribute> <attribute name="JndiName">@bindname@</attribute> </mbean> 2. Make sure your OJB Properties files has the following settings: PersistenceBrokerFactoryClass=ojb.broker.ta.PersistenceBrokerFactoryJ2EEImpl ignoreAutoCommitExceptions=true useAutoCommit=false PersistenceBrokerClass=ojb.broker.ta.PersistenceBrokerJ2EEImpl 3. inside your EJB's you can get a handle on the ODMG like this: private Implementation getODMG() throws EJBException { String pmname = "java:/YourBindingName"; try { ODMGJ2EEFactory factory = (ODMGJ2EEFactory) new InitialContext().lookup(pmname); return factory.getInstance(); } catch (Throwable re) { log(re.getMessage()); re.printStackTrace(); throw new EJBException("An Exception occured " + "when attempting to allocate an ODMG Implementation " + "connection: " + re); } } You can get the persistenceBroker reference from the current transaction and it will also operate properly in the managed environment. NOTES - Local Transactions only support at this time. XA will come in about 2 weeks - Sample EJB code will be delivered sooner, probably 1 week. - JCA for more portability will be delivered in about 2 weeks. - you never need to use the transactions inside OJB for anything related to begin/abort/commit. This will all be handled by the app server. Please let me know if you have any problems. Cheers, Matthew |
From: Oleg N. <on...@uk...> - 2002-05-18 22:03:52
|
Hi Jakob, On Saturday 18 May 2002 10:09, Jakob Braeuchi wrote: > > the column name translation should be performed only in SqlStatment and > > SqlGenerator. Do you agree? > > definitely yes. > > EqualToColumnCriteria is a special case because it explicetely uses the > column name (_not_ the field name) on the right side of =. > this column name should imho not be translated. > i'm not shure about the left side of =. if EqualToColumnCriteria is only > used in MtoNCriteria we could leave the column names on both sides > untranslated. 1) EqualToColumnCriteria can be created without MtoNCriteria via Criteria.addEqualToColumn(). In this case I believe that the field name should be used rather than column name, user shouldn't use column names in Java code at all, they should appear once in repository.xml. I agree with you that such method should be named addEqualToField rather that addEqualToColumn. BTW, why there is no addGreaterThanColumn method, and so on? 2) I believe that MtoNCriteria should be refactored, maybe even removed, but I haven't looked into this issue deeply yet. SqlStatement is able to handle M:N relations and there are testcases showing that, so there is absolutely no need to do this work twice and to introduce MtoNCriteria for that, and then to process MtoNCriteria as a very special case in SqlStatement. > what we definitely need to translate is an optional table name (ie. > T_PERSON.FNAME ) here T_PERSON should be replaced by the alias leading to > A0.FNAME. There is no 1:1 mapping between table names and aliases, one table may appear several times with different aliases. Regards, Oleg |
From: Matthew B. <ma...@so...> - 2002-05-18 19:57:39
|
I just finished my big checkin. I did test, but I will admit I'm very new at CVS, so I hope I didn't mess anything up in the checkin process. I tried to be very careful. If you notice problems, let me know and I'll be available to fix them very quickly. Thanks, Matthew |
From: Thomas M. <tho...@ho...> - 2002-05-18 15:07:10
|
Hi Matthew, hi Jakob, Matthew Baird wrote: > Looks like someone forgot to checkin some conversions stuff in metadata > package. Please fix (you know who you are ;)) > Hi Matthew, hi Jakob, Mhh, I just checked my changes with the CVS on SF. All my recent changes are there! I changed the conversion stuff as follows: conversions are no longer defined per class but per attribute. This allows to reuse predefined conversions much better. There is also a new package ojb.broker.accesslayer.conversions containing the new stuff. I also checked in all necessary changes to the metadata layer and to the repository.dtd. (I did *not* change the new ContentHandler stuff to reflect the new grammar.) Unfortunately Jakob overwrote my changes to RepositoryTags.java. But my changes are in sync with the new repository grammar! SO I will check them in again. I started with the long awaited clean-up of the repository grammar. There will come more changes to the grammar in the next days! This may cause some inconvienience, but we will be rewarded with a much more homogenous and readable repository grammar. cu, Thomas > Thanks, > m > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > |
From: Jakob B. <jbr...@ho...> - 2002-05-18 07:11:15
|
hi oleg, > The way you insert parenthesis doesn't look natural for me, > it doesn't express the tree structure of joins :) well msaccess likes it this way :-) jakob ----- Original Message ----- From: "Oleg Nitz" <on...@uk...> To: <obj...@li...> Sent: Friday, May 17, 2002 12:53 AM Subject: [OJB-developers] Re: SqlStatement > Hi Jakob, > > On Thursday 16 May 2002 08:52, Jakob Braeuchi wrote: > > i have a problem with ms-access (to support it is an ojb feature) and joins > > using the current version of SqlStatement. > > > > SELECT DISTINCT A0.id,A0.idPerson,A0.nummer,A0.saldo FROM tabKonto A0 INNER > > JOIN tabPerson A1 ON A0.idPerson=A1.id INNER JOIN tabTelefon A2 ON > > A1.id=A2.idPerson WHERE (A0.saldo>?) AND A2.tel_nr LIKE ? > > > > this is perfect for mysql but ms-access needs ( ) around nested joins : > > > > SELECT DISTINCT A0.id,A0.idPerson,A0.nummer,A0.saldo FROM (tabKonto A0 > > INNER JOIN tabPerson A1 ON A0.idPerson=A1.id) INNER JOIN tabTelefon A2 ON > > A1.id=A2.idPerson WHERE (A0.saldo>?) AND A2.tel_nr LIKE ? > > > > i've attached a fixed SqlStatement that works with mysql and ms-access, but > > i've NOT tested it with hsql and others. > > could you please have a look at it ? > The way you insert parenthesis doesn't look natural for me, > it doesn't express the tree structure of joins :) > I'd prefer to return to the original way and to use join syntax without > parenthesis for HSQL and MySQL only. > I've committed my verion. Please, let me know what you think. > > > when tryinig to understand your code, i saw that you make heavy use of > > instance variables. > > this is undoubtably perfect for performance, but i think it will complicate > > future refactorings. > > i prefer parameter passing (ie: for stmt in appendTableWithJoins() ). > I agree, actually I usually prefer to use parameter passing and I tell to > others the same things that you told to me :) > And BTW I am not sure that instance variables are better for performance :) > I just tried to make the source code as simple as possible. > I will remove several instance variables. > > Thanks, > Oleg > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Jakob B. <jbr...@ho...> - 2002-05-18 07:04:15
|
hi oleg, > the column name translation should be performed only in SqlStatment and > SqlGenerator. Do you agree? definitely yes. EqualToColumnCriteria is a special case because it explicetely uses the column name (_not_ the field name) on the right side of =. this column name should imho not be translated. i'm not shure about the left side of =. if EqualToColumnCriteria is only used in MtoNCriteria we could leave the column names on both sides untranslated. what we definitely need to translate is an optional table name (ie. T_PERSON.FNAME ) here T_PERSON should be replaced by the alias leading to A0.FNAME. what do you think ? greetings from switzerland jakob ----- Original Message ----- From: "Oleg Nitz" <on...@uk...> To: <obj...@li...> Sent: Friday, May 17, 2002 10:37 PM Subject: Re: [OJB-developers] EqualToColumnCriteria an Aliases > Hi Jakob, > > The SqlStatement contains code that should do this. > Why it doesn't? Probably due to SqlManager intervention, similar to the case > of MToNCriteria. I'll try to remove unnecessary operations in SqlManager, > the column name translation should be performed only in SqlStatment and > SqlGenerator. Do you agree? > > Regards, > Oleg > > > On Friday 17 May 2002 16:37, Jakob Braeuchi wrote: > > hi oleg, > > > > we need a clear definition for EqualToColumnCriteria when used with > > aliases. imho the table name must be replaced by the alias, but i think the > > column name should stay untouched. > > > > ie: PERSON.FIRSTNAME -> Ax.FIRSTNAME > > > > the current version of SqlManager also tries to translate the column name > > and if it can't find a fielddescriptor it keeps the original name. > > this leads to SqlExceptions because the table has an alias and the where > > statement uses the table name: > > > > SELECT DISTINCT > > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entryDat > >e ,A0.idPartner FROM tabPerson A0 WHERE A0.id = tabPerson.id > > > > the correct form of this really useless SQL should be: > > > > ... FROM tabPerson A0 WHERE A0.id = A0.id > > > > maybe we need an EqualToFieldCriteria where both table and field name are > > translated ? > > > > jakob > > > > _______________________________________________________________ > > > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > > the hardware. You get the recognition. Email Us: ban...@so... > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > _______________________________________________________________ > > Hundreds of nodes, one monster rendering program. > Now that▓s a super model! Visit http://clustering.foundries.sf.net/ > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |
From: Matthew B. <ma...@so...> - 2002-05-18 03:03:58
|
Looks like someone forgot to checkin some conversions stuff in metadata package. Please fix (you know who you are ;)) Thanks, m |
From: Oleg N. <on...@uk...> - 2002-05-17 22:08:21
|
Jakob, I prepared a simple test on the base of GraphTest and the generated SQL is okay. You can see this yourself at the very end of GraphTest.java. Could you please add an OJB testcase showing the problem? Thanks, Oleg On Friday 17 May 2002 16:37, Jakob Braeuchi wrote: > hi oleg, > > we need a clear definition for EqualToColumnCriteria when used with > aliases. imho the table name must be replaced by the alias, but i think the > column name should stay untouched. > > ie: PERSON.FIRSTNAME -> Ax.FIRSTNAME > > the current version of SqlManager also tries to translate the column name > and if it can't find a fielddescriptor it keeps the original name. > this leads to SqlExceptions because the table has an alias and the where > statement uses the table name: > > SELECT DISTINCT > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entryDat >e ,A0.idPartner FROM tabPerson A0 WHERE A0.id = tabPerson.id > > the correct form of this really useless SQL should be: > > ... FROM tabPerson A0 WHERE A0.id = A0.id > > maybe we need an EqualToFieldCriteria where both table and field name are > translated ? > > jakob |
From: Leandro R. S. C. <le...@ib...> - 2002-05-17 21:45:31
|
Hi all, I'm trying to use non-decomposed relations but I got some erros when I try something like this : <OBS> UPPER CASE IS USED FOR TABLE NAMES : MYTABLE lower case is used for instances : obj First Upper Case Letter For Classes : MyClass </OBS> I configured a non-decomposed relation A:B using and indirection table. When I try to execute <code> a.setBs(bs); broker.store(a) </code> I see that b tries to store all a's related to it. This generates the first error. Upon source code investigation I found that o.b.s.PersistenceBrokerImpl.storeCollectionObject() had some lines commented to prevent infinite loops and I commented them out ! But it's not working still ! I'm kind of lost because I don't know if this is a configuration error a API usage error or a OJB error ! Anyone is used to changing idirection tables values like the code snippet above ? -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br |
From: Oleg N. <on...@uk...> - 2002-05-17 20:32:02
|
Hi Jakob, The SqlStatement contains code that should do this. Why it doesn't? Probably due to SqlManager intervention, similar to the case of MToNCriteria. I'll try to remove unnecessary operations in SqlManager, the column name translation should be performed only in SqlStatment and SqlGenerator. Do you agree? Regards, Oleg On Friday 17 May 2002 16:37, Jakob Braeuchi wrote: > hi oleg, > > we need a clear definition for EqualToColumnCriteria when used with > aliases. imho the table name must be replaced by the alias, but i think the > column name should stay untouched. > > ie: PERSON.FIRSTNAME -> Ax.FIRSTNAME > > the current version of SqlManager also tries to translate the column name > and if it can't find a fielddescriptor it keeps the original name. > this leads to SqlExceptions because the table has an alias and the where > statement uses the table name: > > SELECT DISTINCT > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entryDat >e ,A0.idPartner FROM tabPerson A0 WHERE A0.id = tabPerson.id > > the correct form of this really useless SQL should be: > > ... FROM tabPerson A0 WHERE A0.id = A0.id > > maybe we need an EqualToFieldCriteria where both table and field name are > translated ? > > jakob > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Oleg N. <on...@uk...> - 2002-05-17 20:28:01
|
Jakob, I've added more parenthesis in the way that you proposed, try now please. Thanks, =9AOleg On Friday 17 May 2002 10:42, Jakob Braeuchi wrote: > hi oleg, > > msaccess has a problem with multiple non nested joins without parenthes= es: > > this query has two NOT NESTED joins, one to tabKonto the other to > tabTelefon: > > SELECT DISTINCT > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entr= yDat >e ,A0.idPartner,A2.tel_nr FROM tabPerson A0 INNER JOIN tabTelefon A2 ON > A0.id=3DA2.idPerson INNER JOIN tabKonto A1 ON A0.id=3DA1.idPerson WHERE > (A1.saldo>?) AND A2.tel_nr LIKE ? ORDER BY 10 > > msaccess can not handle this (Syntax error) , because it needs parenthe= ses > around the first join: > [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler (fehlender Opera= tor) > in Abfrageausdruck 'A0.id=3DA2.idPerson INNER JOIN tabKonto A1 ON > A0.id=3DA1.idPerson'. > > SELECT DISTINCT > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entr= yDat >e ,A0.idPartner,A2.tel_nr FROM (tabPerson A0 INNER JOIN tabTelefon A2 ON > A0.id=3DA2.idPerson) INNER JOIN tabKonto A1 ON A0.id=3DA1.idPerson WHER= E > (A1.saldo>?) AND A2.tel_nr LIKE ? ORDER BY 10 > > NESTED joins are handled correctly by msaccess! this query has a join f= rom > tabKonto to tabPerson and then to tabTelefon: > > SELECT DISTINCT A0.id,A0.idPerson,A0.nummer,A0.saldo FROM tabKonto A0 I= NNER > JOIN (tabPerson A1 INNER JOIN tabTelefon A2 ON A1.id=3DA2.idPerson) ON > A0.idPerson=3DA1.id WHERE A2.tel_nr LIKE ? > > greetings jakob > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We sup= ply > the hardware. You get the recognition. Email Us: bandwidth@sourceforge.= net > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |