Re: Postgresql Blob/LargeObject support in Cayenne

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Oct 02 2005 - 18:38:57 EDT

  • Next message: Oscar Picasso: "Re: Postgresql Blob/LargeObject support in Cayenne"

    On Oct 2, 2005, at 6:23 PM, Oscar Picasso wrote:

    > - Its body would be: st.setBlob(pos, val) instead of setObject(pos,
    > val, type)

    I agree - and you can easily do it within your custom ExtendedType.

    > Maybe the problem could by solved if:
    > - The BlobType.setJdbcObject method were called.

    It must be called... From the stack trace I see that DefaultType is
    used instead of your custom ExtendedType. Why? I don't have enough
    information to tell. There are two possibilities - a bug in Cayenne
    and your code not initializing ExtendedType properly.

    If you can pick inside the Adapter to make sure that your
    ExtendedType is properly registered before commit
    (...adapter.getExtendedTypes()...), please submit a bug report with
    the code to reproduce the problem - I'll take a look..

    Another random idea... In this method:

         public String getClassName() {
             return Blob.class.getName();
         }

    is "Blob" a "java.sql.Blob" or your own implementation of this
    interface? Doublecheck that it is the former.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Oct 02 2005 - 18:39:00 EDT