I think with single table there's only one table that holds attachment data for all attachment entities. That said, I still don't know why you get a JDBCPlugin error. Maybe if you post the entire stack trace that would be helpful.
Ramsey
On Sep 17, 2011, at 4:52 AM, Pascal Robert wrote:
>
> Le 2011-09-17 à 07:22, James Cicenia a écrit :
>
>> Here is my version0 of the migrations... there is no specific
>> ERFileAttachment table. But there is of course an ERAttachment and
>> ERAttachmentData
>>
>>
>> ....
>> Is there supposed to be an ERFileAttachment table?!
>
> If you linked your entity to ERFileAttachment, yes. If you store the
> attachments in the DB, I think the table would be ERDBAttachment. Just do a
> BlessingsAndToasts1 migration that extends from ERAttachmentMigration (like
> the example I gave) and it should be fine.
>
>> Regards
>> James
>>
>>
>> On Sep 17, 2011, at 3:37 AM, Pascal Robert wrote:
>>
>>> Do you have a ERFileAttachment table in your MySQL database? If not, did
>>> you create a migration for ERAttachment, eg:
>>>
>>> public class YourModelName1 extends ERAttachmentMigration {
>>>
>>> public YourModelName1() {
>>> super("TableWithLinkToAttachment",
>>> "ColumnForRelationshipToErAttachment", true);
>>> }
>>>
>>> public NSArray<ERXModelVersion> modelDependencies() {
>>> return null;
>>> }
>>>
>>> @Override
>>> public void downgrade(EOEditingContext editingContext,
>>> ERXMigrationDatabase database) throws Throwable {
>>> // DO NOTHING
>>> }
>>> }
>>>
>>>
>>>> Ok -
>>>>
>>>> Using the WonderMYSQL plugin allowed a complete migration to work!
>>>>
>>>> However, upon testing uploading an attachment I still get this error:
>>>>
>>>> Sep 16 20:25:35 BlessingsApp[6789] DEBUG NSLog Page:
>>>> er.modern.look.pages.ERMODInspectPage - Configuration: EditAuthor - Using
>>>> JDBCPlugIn 'com.webobjects.jdbcadaptor.JDBCPlugIn' for
>>>> JDBCAdaptor@646971142
>>>> Sep 16 20:25:35 BlessingsApp[6789] ERROR
>>>> er.extensions.eof.ERXEOControlUtilities Page:
>>>> er.modern.look.pages.ERMODInspectPage - Configuration: EditAuthor - Caught
>>>> exception when generating primary key for entity: ERFileAttachment
>>>> IllegalArgumentException: Attempt to insert null object into an
>>>> com.webobjects.foundation.NSMutableDictionary.
>>>> at
>>>> com.webobjects.foundation.NSMutableDictionary.setObjectForKey(NSMutableDictionary.java:68)
>>>> ... skipped 6 stack elements
>>>> at
>>>> er.extensions.eof.ERXEOControlUtilities.newPrimaryKeyDictionaryForEntityNamed(ERXEOControlUtilities.java:1050)
>>>> at
>>>> er.extensions.eof.ERXEOControlUtilities.newPrimaryKeyDictionaryForObject(ERXEOControlUtilities.java:1018)
>>>>
>>>> Thoughts?
>>>> Thanks
>>>> James
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>>>
>>>> This email sent to [email protected]
>>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>
>> This email sent to [email protected]
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
>
> This email sent to [email protected]
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
