Oh, I forgot about this:
http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Applications/ Development/Thumbnailing

And you'll want to read this:
http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Applications/ Development/Database_vs_Filesystem

ms

On Apr 3, 2007, at 2:22 PM, Janine Sisk wrote:

I'm back! Setting the filePath binding fixed the problem I was having, but now I'm on to a new one.

My EOModel contains a String, a CLOB, two NSTimestamps and two BLOBs (actually the blobs are in their own model). Each of the corresponding components is bound to them, like so:

Description : WOText {
        value = newPanel.description;
}

ImageFile : WOFileUpload {
        filePath = imageFileName;
        mimeType = imageMimeType;
        data = newPanelImages.big_image;
}

This works fine for everything except the BLOBs, which are tripping the "not null" constraint on those fields in the database.

I have code to check the length of newPanelImages.big_image and it is correct, but somehow it's not working. Here's how I'm doing the save:

        EOEditingContext ec = session().defaultEditingContext();
        ec.insertObject(newPanelImages);
        ec.saveChanges();

And, just in case I'm misinterpreting something, here's the error:

com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: : Next exception:SQL State:23 subclass = 00 -- error code: 357 -- msg: Exception condition 357. Integrity constraint violation (CHECK, PANELIMAGES._C0000000007(\"bigImage\" IS NOT NULL)). Next exception:SQL State:23 subclass = 00 -- error code: 357 -- msg: Exception condition 357. Integrity constraint violation (CHECK, PANELIMAGES._C0000000009(\"thumbnail\" IS NOT NULL)). Next exception:SQL State:40 subclass = 00 -- error code: 363 -- msg: Exception condition 363. Transaction rollback.

It's like the data is not getting copied from the newPanelImages object to the database. Is there something special one has to do to handle BLOBs in FrontBase?

thanks,

janine

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 40mdimension.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to