Hi Håkon, On Nov 12, 2008, at 5:16 AM, Håkon Sagehaug wrote:
HiWould it be better to have the field as a byte[], then write the object tothis array and the store it, instead of straight from Object to db
That's exactly what OpenJPA is doing, so there's no reason why you should have to do it manually.
Just a bit of debugging is needed to see why OpenJPA isn't properly storing or retrieving your object.
Were you following an example from OpenJPA documentation, or trying some things that sounded right?
Craig
Håkon 2008/11/12 Håkon Sagehaug <[EMAIL PROTECTED]>hiSo now I got a class that has a field that is of type java.lang.Object, I seems to go fine storing it, but when I want to retrieve the object from thedb I get null.I use postgresql and tried with two tables one with datatype oid and onewith bytea, but both returns null. Is this the right approach or is this wrong. any tips cheers, Håkon 2008/11/12 Håkon Sagehaug <[EMAIL PROTECTED]> HiSo what I got out of this is, if I've got a object asd type for a field I can persist it but not query it for content, right?? That's fine for me.cheers, Håkon 2008/11/11 Pinaki Poddar <[EMAIL PROTECTED]>Hi,Please refer [1] for different levels of support OpenJPA provides for relation fields whose types are not explicitly declared at design time.[1] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#type -- View this message in context: http://n2.nabble.com/Using-object-as-a-type-for-a-filed-in-a-enity-tp1485319p1485602.html Sent from the OpenJPA Users mailing list archive at Nabble.com.-- Håkon Sagehaug, Software Developer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)-- Håkon Sagehaug, Software Developer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)-- Håkon Sagehaug, Software Developer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)
Craig L Russell Architect, Sun Java Enterprise System http://db.apache.org/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
