ERAttachment Framework
Tutorial Project and Screencast
Unknown macro: color. Click on this message for details.
Unknown macro: color. Click on this message for details.
Official ERAttachment Package Summary/OverviewUnknown macro: color. Click on this message for details.
Unknown macro: color. Click on this message for details.
http://wocommunity.org/podcasts/ERAttachment-Tutorial.movUnknown macro: color. Click on this message for details.
Unknown macro: color. Click on this message for details.
Unknown macro: color. Click on this message for details.
ERAttachmentTutorial.zipUnknown macro: color. Click on this message for details.
Unknown macro: color. Click on this message for details.
If you are using Oracle with ERAttachment, the table creation will fail because one of the attributes is called "size" and this is a reserved word in Oracle DB. To fix that problem, add this to your Properties :
er.extensions.ERXModelGroup.ERAttachment.size.columnName=attachmentSize
If you want to use ERAttachment without using ERXApplication, you need to register the request handler in your Application class with :
ERAttachmentPrincipal.sharedInstance(ERAttachmentPrincipal.class).finishInitialization();
MySQL and ERAttachmentData BLOB size
The prototype for ERAttachmentData.data is 'blob', and the blob proto for MySQL is BLOB when it should really be LONGBLOB. In MySQL a BLOB is on 65K+, a MEDIUMBLOB is up to 64MB and a LONGBLOB is up to 4GB. FrontBase, for example, has only one type, BLOB for binary large objects and it is defined as 4GB (432 bytes). So if you don't want to think about it, then use LONGBLOB in MySQL. If you want to limit the size of what someone can upload and 64MB is the biggest attachment you ever want to be accepted into the database, use MEDIUMBLOB.
Changing the migration-generated tables is easy, for example:
ALTER TABLE ERAttachmentData MODIFY data MEDIUMBLOB;
or
ALTER TABLE ERAttachmentData MODIFY data LONGBLOB;
Meanwhile, when this patch gets applied, new users of blob prototype for new table SQL generation will be saved anguish and debugging grief
http://issues.objectstyle.org/jira/browse/WONDER-528