You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Stephen Winnall <st...@winnall.ch> on 2008/09/13 01:42:52 UTC

Cayenne, XML objects and JDBC 4

I have just discovered Cayenne and would love to use it for a project  
I am working on, but I can't find a way to do something which is  
essential for the project: I want to be able to store and manipulate  
XML objects in the database via JDBC 4. I'm currently using PostgreSQL  
8.3 and have managed to create an XML attribute in a table which other  
Java programs can access, but the Cayenne Modeller can't see it. I'm  
using the latest JDBC 4 from PostgreSQL (8.3-603), and SQuirreL-SQL  
and Aqua Data Studio can see the XML attribute. Cayenne Modeller  
3.0M4, using the same JDBC 4 JAR, cannot see the attribute. (Just to  
complete the picture, I'm running under Mac OS X 10.5 with Java 1.5).

Am I right in assuming that Cayenne has not yet implemented access to  
XML attributes? Is there a known timescale for remedying this? Or can  
someone point me at a dummy's guide to how to do it with Cayenne?

I was trying to decide whether to use Hibernate or iBatis when I  
discovered Cayenne. If Cayenne isn't going to support XML attributes  
via JDBC 4 in the short term I'll have to go back to one of the other  
two. With regret, be it said, because Cayenne seems to be a great  
little product.

Steve


Re: Cayenne, XML objects and JDBC 4

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Sep 15, 2008, at 14:34 , Stephen Winnall wrote:

> Hi Ari
>
> I haven't got that far yet. I was going to get Cayenne to ignore the  
> XML attributes so they weren't generated in class _XXX and then  
> write my own hack in class XXX. JDBC4 does seem to work in  
> principle, just not with Cayenne.
>
> Steve

Until cayenne gets true support for JDBC 4 XML types, you should have  
a look at ExtendedType. I am using ExtendedType to map java geometries  
and even colors to text and blob in the database. It should not be  
hard to write such a ExtendedType for XML if you need it.

Here is the example on how to create an ExtendedType to map geometries.
http://cwiki.apache.org/CAY/mapping-jts-geometries.html

Hope it helps.

Regards,
  - Tore.


Re: Cayenne, XML objects and JDBC 4

Posted by Stephen Winnall <st...@winnall.ch>.
Hi Ari

I haven't got that far yet. I was going to get Cayenne to ignore the  
XML attributes so they weren't generated in class _XXX and then write  
my own hack in class XXX. JDBC4 does seem to work in principle, just  
not with Cayenne.

Steve


On 15 Sep 2008, at 10:35, Aristedes Maniatis <ar...@ish.com.au> wrote:

>
> On 13/09/2008, at 9:42 AM, Stephen Winnall wrote:
>
>> Am I right in assuming that Cayenne has not yet implemented access  
>> to XML attributes?
>
>
>
> Hi Stephen
>
> If you access these attributes using JDBC 3 do they come across as  
> Strings which you can then manipulate with a DOM or SAX parser?
>
> I created a task for JDBC 4 here https://issues.apache.org/cayenne/browse/CAY-1107 
>  so if you feel inspired to work on it you can attach any thoughts  
> about implementation or patches to that task.
>
>
> Ari Maniatis
>
>
>
> -------------------------->
> ish
> http://www.ish.com.au
> Level 1, 30 Wilson Street Newtown 2042 Australia
> phone +61 2 9550 5001   fax +61 2 9550 4001
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>
>

Re: Cayenne, XML objects and JDBC 4

Posted by Aristedes Maniatis <ar...@ish.com.au>.
On 13/09/2008, at 9:42 AM, Stephen Winnall wrote:

> Am I right in assuming that Cayenne has not yet implemented access  
> to XML attributes?



Hi Stephen

If you access these attributes using JDBC 3 do they come across as  
Strings which you can then manipulate with a DOM or SAX parser?

I created a task for JDBC 4 here https://issues.apache.org/cayenne/browse/CAY-1107 
  so if you feel inspired to work on it you can attach any thoughts  
about implementation or patches to that task.


Ari Maniatis



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



Re: Cayenne, XML objects and JDBC 4

Posted by Stephen Winnall <st...@winnall.ch>.
Thanks for this. I suppose a string is the simplest serialization for  
XML. Did you look at how they do indexing and queries? Given a good  
strategy it might not be necessary to use a different base type.

Steve


On 10 Oct 2008, at 18:04, Andrus Adamchik <an...@objectstyle.org>  
wrote:

> We did some research on SQLXML. The summary is this: whatever JDBC4  
> compatibility claims various driver vendors are making, none of them  
> includes actual support for SQLXML (with a possible exception of  
> DB2). Whatever "support" you saw in other tools is probably just  
> treating those columns as String (which Cayenne does just fine as  
> well).
>
> We can fake it on Cayenne end bby implementing our own in-memory  
> SQLXML class mapped to a character column. This seems pretty  
> meaningless though, as the user can read XML from a String and back  
> just as easily. We may still do that fake SQLXML, but for now we'll  
> probably wait for the drivers to catch up.
>
> Here is some relevant links:
>
>  https://issues.apache.org/cayenne/browse/CAY-1107
>  http://markmail.org/message/o2nmvf2o47vte7ee
>
> Cheers,
> Andrus
>
> On Sep 13, 2008, at 2:42 AM, Stephen Winnall wrote:
>
>> I have just discovered Cayenne and would love to use it for a  
>> project I am working on, but I can't find a way to do something  
>> which is essential for the project: I want to be able to store and  
>> manipulate XML objects in the database via JDBC 4. I'm currently  
>> using PostgreSQL 8.3 and have managed to create an XML attribute in  
>> a table which other Java programs can access, but the Cayenne  
>> Modeller can't see it. I'm using the latest JDBC 4 from PostgreSQL  
>> (8.3-603), and SQuirreL-SQL and Aqua Data Studio can see the XML  
>> attribute. Cayenne Modeller 3.0M4, using the same JDBC 4 JAR,  
>> cannot see the attribute. (Just to complete the picture, I'm  
>> running under Mac OS X 10.5 with Java 1.5).
>>
>> Am I right in assuming that Cayenne has not yet implemented access  
>> to XML attributes? Is there a known timescale for remedying this?  
>> Or can someone point me at a dummy's guide to how to do it with  
>> Cayenne?
>>
>> I was trying to decide whether to use Hibernate or iBatis when I  
>> discovered Cayenne. If Cayenne isn't going to support XML  
>> attributes via JDBC 4 in the short term I'll have to go back to one  
>> of the other two. With regret, be it said, because Cayenne seems to  
>> be a great little product.
>>
>> Steve
>>
>>
>

Re: Cayenne, XML objects and JDBC 4

Posted by Andrus Adamchik <an...@objectstyle.org>.
We did some research on SQLXML. The summary is this: whatever JDBC4  
compatibility claims various driver vendors are making, none of them  
includes actual support for SQLXML (with a possible exception of DB2).  
Whatever "support" you saw in other tools is probably just treating  
those columns as String (which Cayenne does just fine as well).

We can fake it on Cayenne end bby implementing our own in-memory  
SQLXML class mapped to a character column. This seems pretty  
meaningless though, as the user can read XML from a String and back  
just as easily. We may still do that fake SQLXML, but for now we'll  
probably wait for the drivers to catch up.

Here is some relevant links:

   https://issues.apache.org/cayenne/browse/CAY-1107
   http://markmail.org/message/o2nmvf2o47vte7ee

Cheers,
Andrus

On Sep 13, 2008, at 2:42 AM, Stephen Winnall wrote:

> I have just discovered Cayenne and would love to use it for a  
> project I am working on, but I can't find a way to do something  
> which is essential for the project: I want to be able to store and  
> manipulate XML objects in the database via JDBC 4. I'm currently  
> using PostgreSQL 8.3 and have managed to create an XML attribute in  
> a table which other Java programs can access, but the Cayenne  
> Modeller can't see it. I'm using the latest JDBC 4 from PostgreSQL  
> (8.3-603), and SQuirreL-SQL and Aqua Data Studio can see the XML  
> attribute. Cayenne Modeller 3.0M4, using the same JDBC 4 JAR, cannot  
> see the attribute. (Just to complete the picture, I'm running under  
> Mac OS X 10.5 with Java 1.5).
>
> Am I right in assuming that Cayenne has not yet implemented access  
> to XML attributes? Is there a known timescale for remedying this? Or  
> can someone point me at a dummy's guide to how to do it with Cayenne?
>
> I was trying to decide whether to use Hibernate or iBatis when I  
> discovered Cayenne. If Cayenne isn't going to support XML attributes  
> via JDBC 4 in the short term I'll have to go back to one of the  
> other two. With regret, be it said, because Cayenne seems to be a  
> great little product.
>
> Steve
>
>


Re: Cayenne Architecture

Posted by Andrus Adamchik <an...@objectstyle.org>.
Also the internal design is documented can be found here:

    http://cayenne.apache.org/doc/design.html

However since the internal design is changing much more frequently  
than the user-facing API, this document may not fully reflect the  
details.

Andrus


On Sep 16, 2008, at 5:28 AM, tmgstewart@aol.com wrote:

> Yes, Ari, I did spend personal time looking into "why use an ORM" as  
> my first step.  I already appreciate that I do not want to scatter  
> SQL statements throughout my code (I could tell that through my  
> first step), and I look forward to happily using Cayenne and  
> contributing back!
>
> Thank you!  I have been watching the interchange with this group,  
> and can see that members support one another eagerly.
>
> Theresa
>
>
> -----Original Message-----
> From: Aristedes Maniatis <ar...@ish.com.au>
> To: user@cayenne.apache.org
> Sent: Mon, 15 Sep 2008 9:20 pm
> Subject: Re: Cayenne Architecture
>
>
> On 16/09/2008, at 12:02 PM, tmgstewart@aol.com wrote:
>
>> I have been investigating Cayenne and have taken the tutorial. I >
> have just now started reading the information on the website.
>>
>> I will be supporting a development that has used Cayenne as its >
> ORM. While I have used standard JDBC connectivity and the >  
> connection object to execute SQL statements on a custom project of >  
> my own, Cayenne is new to me.
>>
>> I have been reviewing the development code that I will be >
> supporting, but I want a higher perspective so that I may understand  
> > the methodology dictating the implementation. In that way, not  
> only > will I understand better the code that I am reading, but also  
> know > how best to support it.
>
> You are probably already aware of the superficial 'why use ORM' argu
> ments [1]. Beyond that, you should read through all the guides on  
> the web site, probably skipping the JPA Guide at this time and also  
> skipping the Remote Client Guide if you are not using ROP in your  
> development.
>
> After you've done that, please come back to the list with any  
> specific questions you have. There are lots of helpful people here  
> who'll be happy to help you. Once you start using an ORM I guarantee  
> you'll never want to scatter bits of SQL through your code ever again.
>
> Ari Maniatis
>
> [1] http://cayenne.apache.org/why-cayenne.html
>
>
> -------------------------->
> ish
> http://www.ish.com.au
> Level 1, 30 Wilson Street Newtown 2042 Australia
> phone +61 2 9550 5001 fax +61 2 9550 4001
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
>
>
>


Re: Cayenne Architecture

Posted by tm...@aol.com.
Yes, Ari, I did spend personal time looking into "why use an ORM" as my 
first step.  I already appreciate that I do not want to scatter SQL 
statements throughout my code (I could tell that through my first 
step), and I look forward to happily using Cayenne and contributing 
back!

Thank you!  I have been watching the interchange with this group, and 
can see that members support one another eagerly.

Theresa


-----Original Message-----
From: Aristedes Maniatis <ar...@ish.com.au>
To: user@cayenne.apache.org
Sent: Mon, 15 Sep 2008 9:20 pm
Subject: Re: Cayenne Architecture


On 16/09/2008, at 12:02 PM, tmgstewart@aol.com wrote: 
 
> I have been investigating Cayenne and have taken the tutorial. I > 
have just now started reading the information on the website. 
> 
> I will be supporting a development that has used Cayenne as its > 
ORM. While I have used standard JDBC connectivity and the > connection 
object to execute SQL statements on a custom project of > my own, 
Cayenne is new to me. 
> 
> I have been reviewing the development code that I will be > 
supporting, but I want a higher perspective so that I may understand > 
the methodology dictating the implementation. In that way, not only > 
will I understand better the code that I am reading, but also know > 
how best to support it. 
 
You are probably already aware of the superficial 'why use ORM' 
argu
ments [1]. Beyond that, you should read through all the guides on 
the web site, probably skipping the JPA Guide at this time and also 
skipping the Remote Client Guide if you are not using ROP in your 
development. 
 
After you've done that, please come back to the list with any specific 
questions you have. There are lots of helpful people here who'll be 
happy to help you. Once you start using an ORM I guarantee you'll never 
want to scatter bits of SQL through your code ever again. 
 
Ari Maniatis 
 
[1] http://cayenne.apache.org/why-cayenne.html 
 
 
--------------------------> 
ish 
http://www.ish.com.au 
Level 1, 30 Wilson Street Newtown 2042 Australia 
phone +61 2 9550 5001 fax +61 2 9550 4001 
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A 
 


Re: Cayenne Architecture

Posted by Aristedes Maniatis <ar...@ish.com.au>.
On 16/09/2008, at 12:02 PM, tmgstewart@aol.com wrote:

> I have been investigating Cayenne and have taken the tutorial.  I  
> have just now started reading the information on the website.
>
> I will be supporting a development that has used Cayenne as its  
> ORM.  While I have used standard JDBC connectivity and the  
> connection object to execute SQL statements on a custom project of  
> my own, Cayenne is new to me.
>
> I have been reviewing the development code that I will be  
> supporting, but I want a higher perspective so that I may understand  
> the methodology dictating the implementation.  In that way, not only  
> will I understand better the code that I am reading, but also know  
> how best to support it.

You are probably already aware of the superficial 'why use ORM'  
arguments [1]. Beyond that, you should read through all the guides on  
the web site, probably skipping the JPA Guide at this time and also  
skipping the Remote Client Guide if you are not using ROP in your  
development.

After you've done that, please come back to the list with any specific  
questions you have. There are lots of helpful people here who'll be  
happy to help you. Once you start using an ORM I guarantee you'll  
never want to scatter bits of SQL through your code ever again.


Ari Maniatis


[1] http://cayenne.apache.org/why-cayenne.html



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



Re: Cayenne Architecture

Posted by tm...@aol.com.
Hi, Ari.

Thank you for responding.

I have been investigating Cayenne and have taken the tutorial.  I have 
just now started reading the information on the website.

I will be supporting a development that has used Cayenne as its ORM.  
While I have used standard JDBC connectivity and the connection object 
to execute SQL statements on a custom project of my own, Cayenne is new 
to me.

I have been reviewing the development code that I will be supporting, 
but I want a higher perspective so that I may understand the 
methodology dictating the implementation.  In that way, not only will I 
understand better the code that I am reading, but also know how best to 
support it.

Thank you again,
Theresa


-----Original Message-----
From: Aristedes Maniatis <ar...@ish.com.au>
To: user@cayenne.apache.org
Sent: Mon, 15 Sep 2008 8:20 pm
Subject: Re: Cayenne Architecture


On 16/09/2008, at 6:40 AM, tmgstewart@aol.com wrote: 
 
> Hi, All. 
> 
> I am new to Cayenne, and I was wondering if someone would please > 
point me to a resource that best describes the Cayenne Architecture. 
> 
> Thank you very much, 
> Theresa 
 
If you mean "getting started on using Cayenne" then you should start 
here [1] 
 
If you mean "how does Cayenne work" then looking at the javadocs [2] is 
the place to start, followed by reading of the fairly well documented 

code. Some of it is quite simple, and other parts extremely complex to 
wrap your head around. 
 
What is it you are wanting to do? 
 
Ari Maniatis 
 
[1] http://cayenne.apache.org/doc20/quick-start.html 
[2] http://cayenne.apache.org/doc/api/index.html 
 
--------------------------> 
ish 
http://www.ish.com.au 
Level 1, 30 Wilson Street Newtown 2042 Australia 
phone +61 2 9550 5001 fax +61 2 9550 4001 
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A 
 


Re: Cayenne Architecture

Posted by Aristedes Maniatis <ar...@ish.com.au>.
On 16/09/2008, at 6:40 AM, tmgstewart@aol.com wrote:

> Hi, All.
>
> I am new to Cayenne, and I was wondering if someone would please  
> point me to a resource that best describes the Cayenne Architecture.
>
> Thank you very much,
> Theresa

If you mean "getting started on using Cayenne" then you should start  
here [1]

If you mean "how does Cayenne work" then looking at the javadocs [2]  
is the place to start, followed by reading of the fairly well  
documented code. Some of it is quite simple, and other parts extremely  
complex to wrap your head around.

What is it you are wanting to do?


Ari Maniatis

[1] http://cayenne.apache.org/doc20/quick-start.html
[2] http://cayenne.apache.org/doc/api/index.html

-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



Cayenne Architecture

Posted by tm...@aol.com.
Hi, All.

I am new to Cayenne, and I was wondering if someone would please point 
me to a resource that best describes the Cayenne Architecture.

Thank you very much,
Theresa

Re: Cayenne, XML objects and JDBC 4

Posted by Andrus Adamchik <an...@objectstyle.org>.
True. The implied idea in my desire to investigate JDBC 4 was that  
this will be implemented as an optional runtime Cayenne module, kind  
of like what we did for Java 1.5 support (enums, etc.) when Cayenne  
was still targeting 1.4 compliancy.

Andrus

On Sep 15, 2008, at 6:18 PM, Michael Gentry wrote:

> Another comment regarding JDK 1.6 ...
>
> Not too long ago, we made the decision to require JDK 1.5 for Cayenne
> 3.  This decision was not done lightly and there was unanimous consent
> from people on the user (not just developer) list to do so.  Since
> Cayenne is really designed to be a server-side framework, we have to
> be cognizant of  server-side deployments of J2EE and stand-alone
> applications, from both a hardware and a software perspective.  Even
> just a year ago, there were still many servers which only had Java 1.4
> installed on them or were running a J2EE container that required Java
> 1.4.  (I personally had deployed an application using Cayenne into
> WebLogic on Solaris using JDK 1.4.)  I think Java 1.6 is at least
> another year off for us.
>
> /dev/mrg
>


Re: Cayenne, XML objects and JDBC 4

Posted by Michael Gentry <bl...@gmail.com>.
Another comment regarding JDK 1.6 ...

Not too long ago, we made the decision to require JDK 1.5 for Cayenne
3.  This decision was not done lightly and there was unanimous consent
from people on the user (not just developer) list to do so.  Since
Cayenne is really designed to be a server-side framework, we have to
be cognizant of  server-side deployments of J2EE and stand-alone
applications, from both a hardware and a software perspective.  Even
just a year ago, there were still many servers which only had Java 1.4
installed on them or were running a J2EE container that required Java
1.4.  (I personally had deployed an application using Cayenne into
WebLogic on Solaris using JDK 1.4.)  I think Java 1.6 is at least
another year off for us.

/dev/mrg

Re: Cayenne, XML objects and JDBC 4

Posted by Stephen Winnall <st...@winnall.ch>.
I took a *very* brief look at the JDBC4 spec. It seems to mention JDK  
5 a lot, and the date of final publication (Nov 2006) seems to me to  
predate the JDK 6 timeframe. But I am no expert on this. I can really  
only offer a willingness to test :)

Steve


On 15 Sep 2008, at 10:04, Andrus Adamchik <an...@objectstyle.org>  
wrote:

>
> On Sep 13, 2008, at 6:28 PM, Stephen Winnall wrote:
>
>> Do you have a feel for the effort required to support JDBC 4?
>
> Sorry, can't give you any accurate estimate for two reasons: I still  
> need to research the scope and after that it is hard to predict the  
> schedule due to the volunteer nature of the project. Just adding  
> support for a new type should not be a big deal though.
>
> But still the same caveat remains: there is a very good chance that  
> it won't work on Java 1.5 (even if compiled with appropriate  
> compiler settings), as JDBC packages included in Java 1.5 do not  
> have a bunch of JDBC 4 things (such as new type definitions).
>
> Andrus

Re: Cayenne, XML objects and JDBC 4

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Sep 13, 2008, at 6:28 PM, Stephen Winnall wrote:

> Do you have a feel for the effort required to support JDBC 4?

Sorry, can't give you any accurate estimate for two reasons: I still  
need to research the scope and after that it is hard to predict the  
schedule due to the volunteer nature of the project. Just adding  
support for a new type should not be a big deal though.

But still the same caveat remains: there is a very good chance that it  
won't work on Java 1.5 (even if compiled with appropriate compiler  
settings), as JDBC packages included in Java 1.5 do not have a bunch  
of JDBC 4 things (such as new type definitions).

Andrus

Re: Cayenne, XML objects and JDBC 4

Posted by Stephen Winnall <st...@winnall.ch>.
Hi Andrus

Thanks for that. If you download the binary JDBC for PostgreSQL JDBC4  
it does indeed appear to be compiled with 1.6. So I naively downloaded  
the sources and compiled them with 1.5: no problem, worked straight  
off. This is the first time I've done anything myself with JDBC, so I  
can't comment on the general compatibility of JDK 1.5 and JDBC 4. JDK  
1.6 on the Mac is a bit of a pain at the moment because it's only 64  
bit, so not everyone can use it; and I have some native interfaces  
which barf on 64 bits...

Do you have a feel for the effort required to support JDBC 4?

Steve


On 13 Sep 2008, at 15:22, Andrus Adamchik wrote:

> Hi Stephen,
>
> Yes, JDBC 4 support is not in Cayenne yet, but I'd very much love to  
> get it going asap.
>
> The thing is - most of the Cayenne developers are working on Macs  
> and there's no Java 1.6 for older 32 bit Mac hardware, so we were  
> slow to jump on it (I do have a 64 bit laptop now though)...
>
> So I am interested how did you get it going with Java 1.5 and  
> PostgreSQL driver? This appears counterintuitive, as the JDBC spec  
> classes are a part of the JRE (regardless of what PostgreSQL puts in  
> their driver jar), so my assumption was that JDK 1.5 is not  
> compatible with JDBC 4, period. Maybe I should do some  
> experimentation when I have more time.
>
> Andrus
>
>
> On Sep 13, 2008, at 2:42 AM, Stephen Winnall wrote:
>
>> I have just discovered Cayenne and would love to use it for a  
>> project I am working on, but I can't find a way to do something  
>> which is essential for the project: I want to be able to store and  
>> manipulate XML objects in the database via JDBC 4. I'm currently  
>> using PostgreSQL 8.3 and have managed to create an XML attribute in  
>> a table which other Java programs can access, but the Cayenne  
>> Modeller can't see it. I'm using the latest JDBC 4 from PostgreSQL  
>> (8.3-603), and SQuirreL-SQL and Aqua Data Studio can see the XML  
>> attribute. Cayenne Modeller 3.0M4, using the same JDBC 4 JAR,  
>> cannot see the attribute. (Just to complete the picture, I'm  
>> running under Mac OS X 10.5 with Java 1.5).
>>
>> Am I right in assuming that Cayenne has not yet implemented access  
>> to XML attributes? Is there a known timescale for remedying this?  
>> Or can someone point me at a dummy's guide to how to do it with  
>> Cayenne?
>>
>> I was trying to decide whether to use Hibernate or iBatis when I  
>> discovered Cayenne. If Cayenne isn't going to support XML  
>> attributes via JDBC 4 in the short term I'll have to go back to one  
>> of the other two. With regret, be it said, because Cayenne seems to  
>> be a great little product.
>>
>> Steve
>>
>>
>


Re: Cayenne, XML objects and JDBC 4

Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Stephen,

Yes, JDBC 4 support is not in Cayenne yet, but I'd very much love to  
get it going asap.

The thing is - most of the Cayenne developers are working on Macs and  
there's no Java 1.6 for older 32 bit Mac hardware, so we were slow to  
jump on it (I do have a 64 bit laptop now though)...

So I am interested how did you get it going with Java 1.5 and  
PostgreSQL driver? This appears counterintuitive, as the JDBC spec  
classes are a part of the JRE (regardless of what PostgreSQL puts in  
their driver jar), so my assumption was that JDK 1.5 is not compatible  
with JDBC 4, period. Maybe I should do some experimentation when I  
have more time.

Andrus


On Sep 13, 2008, at 2:42 AM, Stephen Winnall wrote:

> I have just discovered Cayenne and would love to use it for a  
> project I am working on, but I can't find a way to do something  
> which is essential for the project: I want to be able to store and  
> manipulate XML objects in the database via JDBC 4. I'm currently  
> using PostgreSQL 8.3 and have managed to create an XML attribute in  
> a table which other Java programs can access, but the Cayenne  
> Modeller can't see it. I'm using the latest JDBC 4 from PostgreSQL  
> (8.3-603), and SQuirreL-SQL and Aqua Data Studio can see the XML  
> attribute. Cayenne Modeller 3.0M4, using the same JDBC 4 JAR, cannot  
> see the attribute. (Just to complete the picture, I'm running under  
> Mac OS X 10.5 with Java 1.5).
>
> Am I right in assuming that Cayenne has not yet implemented access  
> to XML attributes? Is there a known timescale for remedying this? Or  
> can someone point me at a dummy's guide to how to do it with Cayenne?
>
> I was trying to decide whether to use Hibernate or iBatis when I  
> discovered Cayenne. If Cayenne isn't going to support XML attributes  
> via JDBC 4 in the short term I'll have to go back to one of the  
> other two. With regret, be it said, because Cayenne seems to be a  
> great little product.
>
> Steve
>
>