Jan Drewnak | 1 Oct 2004 09:13
Picon
Favicon

[OJB] Issue #OJB294 - Wrong SQL Syntax when table with only one field that is ...

You can view the issue detail at the following URL:

    http://nagoya.apache.org/scarab/issues/id/OJB294

Type
 Defect

Issue ID
 OJB294 (Wrong SQL Syntax when table with only one field that is autoincremented in MySQL)

Reported by
 Jan Drewnak
 drewnak (drewnak <at> uni-muenster.de)

New issue details:
---------------------------------------------------------

Description set to "Mapping a class to a table wit..."
Operating system set to "All"
Summary set to " Wrong SQL Syntax when table w..."
Issue created
Platform set to "All"

---------------------------------------------------------
This message is automatically generated by the Scarab
issue tracking system.  For more information:
http://scarab.tigris.org/
arminw | 1 Oct 2004 13:02
Picon
Favicon

cvs commit: db-ojb/src/java/org/apache/ojb/broker/core PersistenceBrokerImpl.java

arminw      2004/10/01 04:02:09

  Modified:    src/java/org/apache/ojb/broker/accesslayer Tag:
                        OJB_1_0_RELEASE RsIterator.java
               src/java/org/apache/ojb/broker/cache Tag: OJB_1_0_RELEASE
                        InternalCache.java
               src/java/org/apache/ojb/broker/core Tag: OJB_1_0_RELEASE
                        PersistenceBrokerImpl.java
  Log:
  Update fix for materialization problem under heavy load

  Revision  Changes    Path
  No                   revision
  No                   revision
  1.63.2.4  +21 -27    db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java

  Index: RsIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java,v
  retrieving revision 1.63.2.3
  retrieving revision 1.63.2.4
  diff -u -r1.63.2.3 -r1.63.2.4
  --- RsIterator.java	30 Sep 2004 14:02:03 -0000	1.63.2.3
  +++ RsIterator.java	1 Oct 2004 11:02:08 -0000	1.63.2.4
   <at>  <at>  -452,32 +452,26  <at>  <at> 
                       synchronized (result)
                       {
                           getCache().enableMaterializationCache();
  -                        try
  -                        {
(Continue reading)

oliver.matz | 1 Oct 2004 13:07
Picon
Favicon

delete on m:n-link-table during INSERT

Hello,

recently, Mariusz Wójcik [mailto:wojcikm <at> okno.pw.edu.pl] pointed out in
the Users' list that whenever an Object that has an empty 
m:n-mapped collection is inserted, the corresponding entries in the 
link-table are deleted.
The code is in PersistenceBrokerImpl.storeAndLinkMtoN(), see below.

I find this very annoying.  Typically, there won't be any objects 
to delete during insert, unless the new primary key had previously 
been used as a foreign key in the link-table.  I bet this chiefly happens
druing testing, but not in real-life applications.

I propose to change this in 1.1.  There could be a configuration switch 
(say, in the collection-descriptor) to get the old behaviour, but the
default
should be NOT to delete during insert.

What do you think?

Olli

if (insert || ...)
{
  // if referenced objects are null, assign empty list
  if(referencedObjects == null)
    {
      referencedObjects = Collections.EMPTY_LIST;
    }
  // ...
(Continue reading)

oliver.matz | 1 Oct 2004 13:52
Picon
Favicon

RE: delete on m:n-link-table during INSERT

Hello again,

> -----Original Message-----

> recently, Mariusz Wójcik [mailto:wojcikm <at> okno.pw.edu.pl] 
> pointed out in
> the Users' list that whenever an Object that has an empty 
> m:n-mapped collection is inserted, the corresponding entries in the 
> link-table are deleted.

it seems Armin has fixed it on Sep. 14., I'll try it.

Thank you for your quick reaction, Armin :-)

Olli
Armin Waibel | 1 Oct 2004 14:01
Picon
Favicon

Re: delete on m:n-link-table during INSERT

Hi Olli,

nice to hear from you.

oliver.matz <at> ppi.de wrote:
> Hello again,
> 
> 
>>-----Original Message-----
> 
> 
>>recently, Mariusz Wójcik [mailto:wojcikm <at> okno.pw.edu.pl] 
>>pointed out in
>>the Users' list that whenever an Object that has an empty 
>>m:n-mapped collection is inserted, the corresponding entries in the 
>>link-table are deleted.
> 
> 
> it seems Armin has fixed it on Sep. 14., I'll try it.
> 
> Thank you for your quick reaction, Armin :-)
> 

yeah, that's my mission fix bugs before they will be detected ;-)

hmm, not sure about this, I only change the order of m:n relation 
methods to increase insert performance, but maybe it's an unexpected 
possible side-effect of my changes.

Armin
(Continue reading)

Armin Waibel | 1 Oct 2004 14:18
Picon
Favicon

OJB 1.0.2 maintenance release?

Hi all,

since OJB 1.0.1 several changes, fixes and performance improvements are 
checked in (see release-notes file). So I think a new maintenance 
release will be appropriated.

Should we release OJB 1.0.2 maintenance release within next 10 days?

regards,
Armin
Armin Waibel | 1 Oct 2004 14:30
Picon
Favicon

[OJB1.1] J2SE 1.4 as minimum requirement for OJB 1.1?

Hi all,

after seeing a similar thread in Forrest I thought about this for OJB1.1.
J2SE 5.0 is released and J2SE1.4 is more than 2 years (August 2002?) 
old. The time frame for OJB1.1 is end of this year (beginning of 2005).

So wouldn't it be reasonable to use J2SE 1.4 as minimum requirement for 
OJB1.1 (JDK 1.3 was released in 2000)? Should we really support a 5 year 
old JVM in OJB1.1? Or need OJB user in year 2005 further on support for 
JDK1.3?

regards,
Armin
Thomas Dudziak | 1 Oct 2004 14:31
Picon
Picon

Re: OJB 1.0.2 maintenance release?

Armin Waibel wrote:

> Hi all,
>
> since OJB 1.0.1 several changes, fixes and performance improvements 
> are checked in (see release-notes file). So I think a new maintenance 
> release will be appropriated.
>
> Should we release OJB 1.0.2 maintenance release within next 10 days?

+1, though we should check the (online) docs prior to releasing, as 
well. At the weekend (when I finally have a bit of spare time), I'll 
check the tutorials and update them as needed.

Tom
Thomas Dudziak | 1 Oct 2004 14:36
Picon
Picon

Re: [OJB1.1] J2SE 1.4 as minimum requirement for OJB 1.1?

Armin Waibel wrote:

> Hi all,
>
> after seeing a similar thread in Forrest I thought about this for OJB1.1.
> J2SE 5.0 is released and J2SE1.4 is more than 2 years (August 2002?) 
> old. The time frame for OJB1.1 is end of this year (beginning of 2005).
>
> So wouldn't it be reasonable to use J2SE 1.4 as minimum requirement 
> for OJB1.1 (JDK 1.3 was released in 2000)? Should we really support a 
> 5 year old JVM in OJB1.1? Or need OJB user in year 2005 further on 
> support for JDK1.3?

Hmm, what are the immediate benefits for the developers ? I mean, J2SE 
1.4 does not differ too much from 1.3, at least it is manageable with 
the preprocessing, or not ?
And IMO we should only officially claim support for J2SE 5 iff we 
support the new language features, foremost enums, autoboxing and 
templates. Not to forget that a few folks still use OJB with J2SE/J2EE 
1.3 and might not be able to change anytime soon.

Tom
Brian McCallister | 1 Oct 2004 14:51
Favicon

Re: OJB 1.0.2 maintenance release?

I agree with Tom on the docs, we added some actual functionality iirc. 
Good to put in docs.

Either way, +1 for 1.0.2.

I'm happy to bundle it again, but will be away from the 8th to the 18th 
of October, so if the release falls in that window, won't be able to 
to.

-Brian

On Oct 1, 2004, at 8:31 AM, Thomas Dudziak wrote:

> Armin Waibel wrote:
>
>> Hi all,
>>
>> since OJB 1.0.1 several changes, fixes and performance improvements 
>> are checked in (see release-notes file). So I think a new maintenance 
>> release will be appropriated.
>>
>> Should we release OJB 1.0.2 maintenance release within next 10 days?
>
> +1, though we should check the (online) docs prior to releasing, as 
> well. At the weekend (when I finally have a bit of spare time), I'll 
> check the tutorials and update them as needed.
>
> Tom
>
>
(Continue reading)


Gmane