mkalen | 1 Jun 2005 01:52
Picon
Favicon

cvs commit: db-ojb/src/ojb-blank build.xml

mkalen      2005/05/31 16:52:09

  Modified:    src/ojb-blank Tag: OJB_1_0_RELEASE build.xml
  Log:
  Fix paths for tutorial 5 / JDO.

  Revision  Changes    Path
  No                   revision
  No                   revision
  1.5.2.5   +8 -3      db-ojb/src/ojb-blank/build.xml

  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ojb-blank/build.xml,v
  retrieving revision 1.5.2.4
  retrieving revision 1.5.2.5
  diff -u -r1.5.2.4 -r1.5.2.5
  --- build.xml	22 Nov 2004 22:32:32 -0000	1.5.2.4
  +++ build.xml	31 May 2005 23:52:09 -0000	1.5.2.5
   <at>  <at>  -42,6 +42,11  <at>  <at> 
           </fileset>
       </path>

  +    <path id="compile-build-classpath">
  +        <pathelement path="${build.dir}/classes"/>
  +        <path refid="compile-classpath"/>
  +    </path>
  +
       <path id="runtime-classpath">
           <fileset dir="${lib.dir}">
(Continue reading)

mkalen | 1 Jun 2005 01:55
Picon
Favicon

cvs commit: db-ojb/src/ojb-blank build.xml

mkalen      2005/05/31 16:55:37

  Modified:    src/ojb-blank build.xml
  Log:
  Fix paths for tutorial 5 / JDO.

  Revision  Changes    Path
  1.8       +8 -4      db-ojb/src/ojb-blank/build.xml

  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/ojb-blank/build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.xml	24 Nov 2004 22:31:13 -0000	1.7
  +++ build.xml	31 May 2005 23:55:37 -0000	1.8
   <at>  <at>  -42,6 +42,11  <at>  <at> 
           </fileset>
       </path>

  +    <path id="compile-build-classpath">
  +        <pathelement path="${build.dir}/classes"/>
  +        <path refid="compile-classpath"/>
  +    </path>
  +
       <path id="runtime-classpath">
           <fileset dir="${lib.dir}">
               <exclude name="xdoclet*.jar"/>
   <at>  <at>  -189,7 +194,7  <at>  <at> 
(Continue reading)

Alex Yacoub | 2 Jun 2005 20:19
Picon
Favicon

New Conversion patch?

Hello,

I've added a new conversion to OJB from java.util.Date to  
java.sql.Time.  Basically, I just took a currently existing  
conversion and changed it slightly to use sql.Time instead of  
sql.Date.  Is there any interest in including this in the mainline  
OJB?  I can attach a patch if so.

Thanks,
--
Alex Yacoub, Research Assistant
Open Courseware Lab
North Carolina State University
Anthony Brittis (JIRA | 3 Jun 2005 01:58
Picon
Favicon

[jira] Created: (OJB-45) DescriptorRepository.getAllMappedColumns() does not work properly if two or more classes are mapped to the same table but have different field descriptors for a single column.

DescriptorRepository.getAllMappedColumns() does not work properly if two or more classes are mapped to
the same table but have different field descriptors for a single column.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

         Key: OJB-45
         URL: http://issues.apache.org/jira/browse/OJB-45
     Project: OJB
        Type: Bug
  Components: PB-API  
    Versions: 1.0.x CVS    
 Environment: Windows XP Pro with Tomcat 5 running with ojb 1.0rc6
    Reporter: Anthony Brittis

DescriptorRepository.getAllMappedColumns() does not work properly if two or more classes are mapped to
the same table but have different field descriptors for a single column.

Since this method caches field descriptors using the column name as the key, only one class-descriptors
version will be stored and used.  

If two or more classes are mapped to the same table, but have different field descriptors for a column, only
one of the field descriptors will "win-out" and be used by the rest of the classes.  This is a particular
problem if you want to use different jdbc-type and conversion attribute values.

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
(Continue reading)

Martin Kalén | 3 Jun 2005 12:31
Picon
Favicon

Re: New Conversion patch?

Alex Yacoub wrote:
> I've added a new conversion to OJB from java.util.Date to  
> java.sql.Time.  Basically, I just took a currently existing  conversion 
> and changed it slightly to use sql.Time instead of  sql.Date.  Is there 
> any interest in including this in the mainline  OJB?  I can attach a 
> patch if so.

Thanks, your contribution is appreciated.

Sure, why not? Once you have mastered your first conversion class
it's easy enough to tweak them to whicever types you use -- but having a
good set of standard conversion classes in the OJB distribution would
lower the barrier for new users.

I suppose it's easiest to track this if you open an improvement
in JIRA [1] and attach your code there. (Set affected versions to both
v1.0.3 and v1.1 CVS, if prompted, so that the class gets added to
branch and trunk.)

Regards,
  Martin

[1] http://issues.apache.org/jira/secure/BrowseProject.jspa?id=OJB
Robert S. Sfeir | 4 Jun 2005 15:09

SQL Conversion not working in 1.0.3???

Hey guys,

I've been trying to figure out if this is something OJB is doing or  
something Spring Framework's hooks are doing.

I have a definition of a field as follows:

          <field-descriptor
             name="submissionDate"
             column="ticket_submissionDate"
             jdbc-type="TIMESTAMP"

conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlTi 
mestampFieldConversion"
             >
         </field-descriptor>

The data incoming is a long and the Object is an instace of Date,  
which according to the converting class is correct.  After doing more  
stepping through the code in the debugger, I noticed that the  
conversion class never gets called.  I even set it to something  
completely ridiculous and nothing failed.

So the question is, did something fall off here in the move to ojb  
1.0.3 or is this something I should take up with Juergen on the  
Spring list?

Thanks
R
(Continue reading)

Robert S. Sfeir | 4 Jun 2005 15:18

Re: SQL Conversion not working in 1.0.3???

Sorry should have mentioned the exception is:

org.springframework.jdbc.UncategorizedSQLException: OJB operation:  
encountered SQLException [Wrong data type: Timestamp format must be  
yyyy-mm-dd hh:mm:ss.fffffffff]; nested exception is  
java.sql.SQLException: Wrong data type: Timestamp format must be yyyy- 
mm-dd hh:mm:ss.fffffffff
java.sql.SQLException: Wrong data type: Timestamp format must be yyyy- 
mm-dd hh:mm:ss.fffffffff

I'm using hsqldb 1.7.3.

R

On Jun 4, 2005, at 9:09 AM, Robert S. Sfeir wrote:

> Hey guys,
>
> I've been trying to figure out if this is something OJB is doing or  
> something Spring Framework's hooks are doing.
>
> I have a definition of a field as follows:
>
>          <field-descriptor
>             name="submissionDate"
>             column="ticket_submissionDate"
>             jdbc-type="TIMESTAMP"
>              
> conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2Sql 
> TimestampFieldConversion"
(Continue reading)

Robert S. Sfeir | 4 Jun 2005 15:33

Re: SQL Conversion not working in 1.0.3???

Nevermind.  Self brain fart, the repository xml I had modified was  
not deployed to the proper location for my unit test to find.

All is well, sorry for any inconvenience.

R

On Jun 4, 2005, at 9:18 AM, Robert S. Sfeir wrote:

> Sorry should have mentioned the exception is:
>
> org.springframework.jdbc.UncategorizedSQLException: OJB operation:  
> encountered SQLException [Wrong data type: Timestamp format must be  
> yyyy-mm-dd hh:mm:ss.fffffffff]; nested exception is  
> java.sql.SQLException: Wrong data type: Timestamp format must be  
> yyyy-mm-dd hh:mm:ss.fffffffff
> java.sql.SQLException: Wrong data type: Timestamp format must be  
> yyyy-mm-dd hh:mm:ss.fffffffff
>
> I'm using hsqldb 1.7.3.
>
> R
>
> On Jun 4, 2005, at 9:09 AM, Robert S. Sfeir wrote:
>
>
>> Hey guys,
>>
>> I've been trying to figure out if this is something OJB is doing  
>> or something Spring Framework's hooks are doing.
(Continue reading)

arminw | 4 Jun 2005 16:13
Picon
Favicon

cvs commit: db-ojb/src/java/org/apache/ojb/broker/platforms Platform.java PlatformHsqldbImpl.java PlatformSapdbImpl.java

arminw      2005/06/04 07:13:43

  Modified:    src/java/org/apache/ojb/broker/accesslayer Tag:
                        OJB_1_0_RELEASE JdbcAccessImpl.java
                        StatementManager.java StatementManagerIF.java
                        StatementsForClassIF.java
                        StatementsForClassImpl.java
               src/java/org/apache/ojb/broker/platforms Tag:
                        OJB_1_0_RELEASE Platform.java
                        PlatformHsqldbImpl.java PlatformSapdbImpl.java
  Log:
  replace Platform#isCallableStatement method and introduce an contract between JdbcAccess and
StatementManager to detect the use of stored procedures.

  Revision  Changes    Path
  No                   revision
  No                   revision
  1.22.2.6  +59 -20    db-ojb/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java

  Index: JdbcAccessImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java,v
  retrieving revision 1.22.2.5
  retrieving revision 1.22.2.6
  diff -u -r1.22.2.5 -r1.22.2.6
  --- JdbcAccessImpl.java	26 Apr 2005 03:41:35 -0000	1.22.2.5
  +++ JdbcAccessImpl.java	4 Jun 2005 14:13:43 -0000	1.22.2.6
   <at>  <at>  -177,7 +177,7  <at>  <at> 
           {
               final String sql = this.broker.serviceSqlGenerator().getPreparedDeleteStatement(query, cld);
(Continue reading)

arminw | 4 Jun 2005 16:15
Picon
Favicon

cvs commit: db-ojb/src/java/org/apache/ojb/broker/util BrokerHelper.java

arminw      2005/06/04 07:15:37

  Modified:    src/java/org/apache/ojb/broker/util Tag: OJB_1_0_RELEASE
                        BrokerHelper.java
  Log:
  replace Platform#isCallableStatement method and introduce an contract between JdbcAccess and
StatementManager to detect the use of stored procedures.

  Revision  Changes    Path
  No                   revision
  No                   revision
  1.57.2.17 +3 -3      db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java

  Index: BrokerHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java,v
  retrieving revision 1.57.2.16
  retrieving revision 1.57.2.17
  diff -u -r1.57.2.16 -r1.57.2.17
  --- BrokerHelper.java	10 May 2005 19:08:54 -0000	1.57.2.16
  +++ BrokerHelper.java	4 Jun 2005 14:15:37 -0000	1.57.2.17
   <at>  <at>  -694,8 +694,8  <at>  <at> 
           ResultSet rs = null;
           try
           {
  -            stmt = sm.getPreparedStatement(cld, sql, false, 1);
  -            sm.bindSelect(stmt, oid, cld);
  +            stmt = sm.getPreparedStatement(cld, sql, false, 1, false);
  +            sm.bindSelect(stmt, oid, cld, false);
               rs = stmt.executeQuery();
(Continue reading)


Gmane