Hi Kieran,

Have you tried vertical inheritance with MySQL?  I have Animal->Cat->Leopard.  
I try to create a leopard and it fails because 

com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: 
<com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: "INSERT INTO 
Leopard(spots, id) VALUES (?, ?)" withBindings: 1:33(spots), 2:9(id)>:
    Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or 
update a child row: a foreign key constraint fails (`example/leopard`, 
CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`))

It gets the adaptor operations for Animal, then Leopard, then Cat... and blows 
up at leopard because there's no cat yet (I think).  I had to google for "What 
are deferred constraints" so I could be very wrong, but I think it's blowing up 
because of lack of deferred constraints (^_^) It looks like I'll need to have 
an EODatabaseContext delegate override 
databaseContextWillOrderAdaptorOperations to fix it, unless there is something 
in the ERXSQLHelper that can get there first.

This just happens to be a timely thread since I was messing with my MySQLPlugin 
last night (^_^)

Ramsey

On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote:

> Fair enough. Finally, we have one specific strike against it. ;-)
> 
> Since we have Delete rules in the EOModel, is this feature a "safety net" 
> that is needed for external non-WO apps that are accessing the database? I 
> have never implemented constraints and have yet to have an orphan record 
> since transactions/rollback protect against that, right?
> 
> -Kieran
> 
> On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote:
> 
>> 
>> On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote:
>> 
>>> On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote:
>>> 
>>>> I was just wondering why people were saying disaster, toy, etc .... 
>>>> wondering if I am missing something and going to lose all my data next 
>>>> week!
>>>> 
>>>> Like I said, I have not used FrontBase or PostgreSQL in production and 
>>>> have never touched PostgreSQL, so if it is comparison you are after, I 
>>>> don't have one. However I will say that I started using MySQL at 4.0, then 
>>>> 4.1 and now 5.0. Being the stickler for learning as much as I think I need 
>>>> to do something right, I bought the original Jeremy Zawodny book "Advanced 
>>>> MySQL" and that gave me a clear understanding and confidence of how to set 
>>>> the thing up. I have never used the cluster engine (NDB).... yet. I have 
>>>> always used InnoDB. I used MyISAM once for a readonly database (about 5 
>>>> tables only) that has geocode lookups on tables of about 100 million rows 
>>>> because at the time it appeared faster (with mysql 4.0 at the time) to do 
>>>> points in radius operations which sometimes selected up to 500,000 rows in 
>>>> a select. My main ongoing project is InnoDB and every user is a user that 
>>>> does edits, with a small percentage of users absolutely hammering the 
>>>> database with production processing during business hours each day. I 
>>>> replicate to 3 slaves on that project purely for backup. It runs 24/7 and 
>>>> almost never have any "Scheduled Maintenance" downtime garbage because of 
>>>> the fact that the replication slaves are where the backups happen. One 
>>>> slave is remote and 2 onsite with the master. The binary logs on the 
>>>> master are written to a separate phyaical drive
>>>> 
>>>> Why do I like it?
>>>> - It is free
>>>> - It has never left me down - no data/table corruption
>>>> - It is simple to set up and configure
>>>> - replication is a breeze to set up
>>>> - It has multiple engine types for different scenarios
>>>> - and finally the reason that most people like what they use: "I am 
>>>> comfortable with it" ;-)
>>>> 
>>>> 
>>>> What would I like that I think I might be missing?
>>>> - transactional structure changes (ie., create table and roll back.) 
>>>> transactions in InnoDB only apply to table/record edits themselves.
>>> 
>>> + Deferred constraints!
>> 
>> 
>> That is a pretty big strike against MySQL in my books.
>> 
>> 
>> Chuck
>> 
>> -- 
>> Chuck Hill             Senior Consultant / VP Development
>> 
>> Practical WebObjects - for developers who want to increase their overall 
>> knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/products/practical_webobjects
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> 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/kieran_lists%40mac.com
>> 
>> This email sent to kieran_li...@mac.com
> 
> _______________________________________________
> 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/rgurley%40mac.com
> 
> This email sent to rgur...@mac.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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 arch...@mail-archive.com

Reply via email to