I was able to sort this issue.
 
When you implement TimeStampable two methods need to be overidden:
 
    public void jdoSetTimeStamp(long l)
    {
        setTimeStamp(l);
    }
   
    public long jdoGetTimeStamp()
    {
        return getTimeStamp();
    }
 
 
Since the runtime error message was complaining about the getTimeStamp method not available, I add two additional methods:
 
 
    public long getTimeStamp()
    {
        return timeStamp;
    }
   
    public void setTimeStamp(long _timeStamp)
    {
        this.timeStamp = _timeStamp;
    }
 
Another issue was that I had defimed in my Mapping Table the IDENTITY as "BookTitle" as Varchar.
 
If I wanted to change the book title I got another titel, using the UPDATE command I got a runtime error relating to the TimeStamp no longer in cache. But this is no longer a problem since I load the object and apply the commit command.
 
regards
John.
 
 
 
-----Original Message-----
From: John Greene [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 12:16 PM
To: [email protected]
Subject: RE: [castor-user] BIGINT Support in Castor

Hi Werner,
 
Yes, I agree that it should work as is.
 
I'd like to run a few more test at my end first; if I continue to hit a "brick wall" I'll raise a new issue.
 
regards
John
-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 02:44 AM
To: [email protected]; [EMAIL PROTECTED]
Subject: RE: [castor-user] BIGINT Support in Castor

John,
 
That should work out of the box. Can you please - as already indicated - open a new issue at http://jira.codehaus.org/browse/CASTOR and attach a stripped down sample that shows your problem.
 
Thanks
Werner


From: John Greene [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 14. Februar 2006 22:32
To: [email protected]
Subject: RE: [castor-user] BIGINT Support in Castor

Thanks for the input.
 
I am implementing "TimeStampable" which returns a type "long". 
 
 
public class Student implements TimeStampable
{
    .........
 
    public void jdoSetTimeStamp(long l)
    {
        timeStamp = l;
    }
 
    public long jdoGetTimeStamp()
    {
        return timeStamp;
    }
}
 
 
As you have said derby support "bigint" not "long" data type.  But in my mapping file I did the mapping as follows:..........

<field name="timestamp" type="long">

<sql name="timestamp" type="bigint"/>

</field>

John.
 
 -----Original Message-----
From: Brian Schlining [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 14, 2006 12:07 PM
To: [email protected]
Subject: Re: [castor-user] BIGINT Support in Castor

I have a castor app that I've tested against both Derby and SQL Server. All the primary keys are bigints and the app works fine against both databases. The Castor mapping can be found at


Cheers
B

Hi Werner,

Quick question, does Castor support the sql type "BIGINT "?

My Derby database uses type "BIGINT" intead of "long"

Reported Run-time error:
org.exolab.castor.mapping.MappingException: Nested error:
org.exolab.castor.mapping.MappingException:
The SQL type BIGINT is not supported in this release



-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

-------------------------------------------------


~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
MBARI
Software Engineer
(831)775-1855


Reply via email to