|
[
Permlink
| « Hide
]
Patrick Linskey added a comment - 21/May/07 09:59 PM
Ignacio Andreu will be working on this issue for the Google Summer of Code project. It would seem that JIRA only allows me to assign issues to committers, so I'm assigning it to myself to keep it out of the unassigned queue.
Assigning to Ignacio, who is working on this as part of the Google Summer of Code internship program.
Now is the time to decide what will be the best way to mark this fields. In my opinion we have two options, we can to use the @LOB annotation or to create a @Stream annotation. What do you think?
I don't yet see the need to create another annotation.
If you annotate an InputStream with @LOB then OpenJPA should be smart enough to figure it out. @Entity public class Employee { ... @LOB @Column(name="PHOTO") private InputStream photoStream; ... } My only concern with Craig's suggestion is compatibility if the JPA spec team decides to go a different route in a future version. If we use our own annotation, then we can maintain compatibility for it even in the face of spec changes.
This patch was part of my Summer of Code work, all the tests work fine in MySQL, Oracle and SQL Server.
Streams are mapped using @Persistent annotation. @Entity public class Employee { ... @Persistent private InputStream photoStream; ... } Great work, Ignacio! I checked in the patch (with a couple of minor whitespace tweaks).
I'm going to leave this issue open for right now; we need to document the new feature still, and this will help us track that work. This patch corrects some bugs and add new test cases.
New test cases & fixed bugs: - testUpdateWithNull - testUpdateANullObjectWithoutNull Modified: - blobBufferSize and clobBufferSize. I've increased the buffer value. BTW, I'm trying to add Streaming support to Derby, my approach is not finished yet, It loads the results from the database when I use the load() method but it fails when I try to load with a Query. Next week i will put here my approach. Sorry, my derby approach is success using the find() method
This patch adds support for Streams in PostgreSQL and documentation about this issue.
Resolved with Ignacio's recent work. There is still an open issue regarding Postgres and database cleanup; this will be managed through a separate JIRA issue.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||