They are both bugs in WebObjects, but thanks for verifying them.

Sent from my iPhone

On Feb 3, 2011, at 6:52 AM, Dev WO <[email protected]> wrote:

> While working on getting this answered for you, I made a couple more tests 
> and here is what I get:
> 
> -If I set an external name (Table Name) for the parents entities, the SQL 
> generated with EntityModeler for the database creation is still wrong.
> But entity.primaryKeyRootName returns "CoreTable" (which is the external name 
> for Core)
> And if I run the app, it actually run correctly, generating pKs from the 
> CoreTable sequence
> 
> So it's kind of a no-issue, as long as you remember that EntityModeler won't 
> create things correctly when you setup the database
> 
> -If I don't set an external name for the parents entities, the SQL generated 
> with EntityModeler for the database creation is wrong.
> And entity.primaryKeyRootName returns either "Employee" or "Customer"
> And if I run the app, it breaks everything by requesting pKs from the 
> sub-entities sequences
> 
> So I would say there's a bug in WebObjects 5.4 which you can get around by 
> providing external name to parent abstract entities.
> There's a bug somewhere else that lead EntityModeler to generate the wrong 
> SQL when setting up the database.
> 
> So I guess it is solved or at least there's a way to make it work thanks to 
> this really great community:)
> 
> Thanks,
> 
> Xavier
> 
> On 2 févr. 2011, at 22:59, Mike Schrag wrote:
> 
>> i still would like to see what entity.primaryKeyRootName returns for each 
>> ... i don't recall what the impl was in 5.4.3 and I don't have it checked 
>> out at the moment, but i'm pretty sure that method is the only thing that 
>> matters here.
>> 
>> ms
>> 
>> On Feb 2, 2011, at 4:56 PM, Chuck Hill wrote:
>> 
>>> 
>>> On Feb 2, 2011, at 1:03 PM, Dev WO wrote:
>>> 
>>>> OK, I tried this actually (even if I don't like that because it creates 
>>>> un-used tables I have to clean;)),
>>> 
>>> Some databases (FrontBase) need this table as the sequence is attached to 
>>> it.
>>> 
>>> 
>>>> but still got the wrong inheritance.
>>>> 
>>>> So maybe not a winner Chuck;)
>>>> But I would have hoped for;)
>>>> 
>>>> Another player? same player shoot again?
>>> 
>>> With the table name set, what do you see?  What do you expect to see?
>>> 
>>> 
>>> Chuck
>>> 
>>> 
>>>>> On Feb 2, 2011, at 12:56 PM, Dev WO wrote:
>>>>> 
>>>>>> 
>>>>>>> see what entity.primaryKeyRootName() returns for each of the entities 
>>>>>>> involved ...
>>>>>>> 
>>>>>>> actually on your abstract entity, did you set an external name? make 
>>>>>>> sure you set that -- external name on the root entity is what is used 
>>>>>>> in 5.4.3 to determine what sequence to generate.
>>>>>> 
>>>>>> I was about to try this, but actually, where did you set the "external" 
>>>>>> name in Entity Modeler?? I just have a "name" field:(
>>>>>> 
>>>>>> Xavier
>>>>>> 
>>>>>>> 
>>>>>>> ms
>>>>>>> 
>>>>>>> On Feb 2, 2011, at 3:42 PM, Chuck Hill wrote:
>>>>>>> 
>>>>>>>> 
>>>>>>>> On Feb 2, 2011, at 12:36 PM, Dev WO wrote:
>>>>>>>> 
>>>>>>>>>> This sounds really familiar ... I think it was a bug in 5.4.3.
>>>>>>>>> 
>>>>>>>>> OK, and as I wouldn't hold my breath for 5.4.4 is there a way to fix 
>>>>>>>>> it:)
>>>>>>>> 
>>>>>>>> It can probably be fixed in Wonder.  But first you have to identify 
>>>>>>>> where the problem is and what the fix is.  :-)
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Chuck
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>>> On Feb 2, 2011, at 12:46 PM, Dev WO wrote:
>>>>>>>>>> 
>>>>>>>>>>> Hello Chuck,
>>>>>>>>>>> 
>>>>>>>>>>> With JavaERJDBCAdaptor or the default JavaJDBCAdaptor, the result 
>>>>>>>>>>> is the same, it doesn't conform to the inheritance modeled in 
>>>>>>>>>>> EntityModeler.
>>>>>>>>>>> I've got to check into ERExtensions if I can find something.
>>>>>>>>>>> 
>>>>>>>>>>> I understand not everyone is using Horizontal Inheritance, but I 
>>>>>>>>>>> must not be the only one trying to figure out what's going on with 
>>>>>>>>>>> 5.4.
>>>>>>>>>>> 
>>>>>>>>>>> Just to make sure, I've created a new Wonder framework, created 
>>>>>>>>>>> only an abstract entity and 2 sub-entities with horizontal 
>>>>>>>>>>> inheritance, and the generated SQL is not correct, it doesn't 
>>>>>>>>>>> conform to the modeled inheritance by requesting sequence for the 
>>>>>>>>>>> pk for each sub-entity instead of the abstract parent sequence.
>>>>>>>>>>> It looks to me this is a bug, I'm not 100% sure it's in Wonder or 
>>>>>>>>>>> Webobjects though. Should I fill a Jira for this? I don't think 
>>>>>>>>>>> this could be qualified as a regression as I don't even know if 
>>>>>>>>>>> this bug was ever in 5.3.
>>>>>>>>>>> 
>>>>>>>>>>> Thanks for your help,
>>>>>>>>>>> 
>>>>>>>>>>> Xavier
>>>>>>>>>>> 
>>>>>>>>>>> On 1 févr. 2011, at 20:24, Chuck Hill wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Hi Xavier,
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> On Feb 1, 2011, at 12:42 AM, Dev WO wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> I'm still trying to figure out what's happening...
>>>>>>>>>>>>> What I have found so far is that:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> If I'm doing:
>>>>>>>>>>>>> -latest 5.4 wonder frameworks except JavaERJDBCAdaptor.framework 
>>>>>>>>>>>>> and PostgresqlPlugIn.framework from 5.3
>>>>>>>>>>>>> -binding to WebObjects 5.4 (using 
>>>>>>>>>>>>> wo.system.frameworks=/System/Library/Frameworks/WebObjects54 in 
>>>>>>>>>>>>> my wolips.properties)
>>>>>>>>>>>>> => SQL generation doesn't conform to entity inheritance
>>>>>>>>>>>>> 
>>>>>>>>>>>>> If I'm doing:
>>>>>>>>>>>>> -latest 5.4 wonder frameworks
>>>>>>>>>>>>> -binding to WebObjects 5.4 (using 
>>>>>>>>>>>>> wo.system.frameworks=/System/Library/Frameworks/WebObjects54 in 
>>>>>>>>>>>>> my wolips.properties)
>>>>>>>>>>>>> => SQL generation doesn't conform to entity inheritance
>>>>>>>>>>>> 
>>>>>>>>>>>> Try it without JavaERJDBCAdaptor.framework at all (just use 
>>>>>>>>>>>> JavaJDBCAdaptor.framework)
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>>> if I'm doing:
>>>>>>>>>>>>> -lastest 5.3 wonder frameworks
>>>>>>>>>>>>> -binding to WebObjects 5.3 (using 
>>>>>>>>>>>>> wo.system.frameworks=/System/Library/Frameworks/WebObjects53 in 
>>>>>>>>>>>>> my wolips.properties)
>>>>>>>>>>>>> => I've got the correct behavior which is inheritance enforced 
>>>>>>>>>>>>> when generating the SQL in EntityModeler.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> So I can say there is something different regarding horizontal 
>>>>>>>>>>>>> inheritance between WebObjects 5.3 and WebObjects 5.4. Based on 
>>>>>>>>>>>>> the first case scenario, it seems the difference occurs within 
>>>>>>>>>>>>> WebObjects frameworks (but maybe something else is involved in 
>>>>>>>>>>>>> the Wonder frameworks in addition to the 2 I keept from 5.3 in 
>>>>>>>>>>>>> the first case).
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I don't know if this is to be considered a bug or if there's just 
>>>>>>>>>>>>> something I should add/edit to make horizontal inheritance works 
>>>>>>>>>>>>> under a complete 5.4 setup, but the fact that I couldn't find the 
>>>>>>>>>>>>> same issue on the list makes me feel like the issue could at 
>>>>>>>>>>>>> least be fixed on my side.
>>>>>>>>>>>> 
>>>>>>>>>>>> It might be that few people are using Horizontal Inheritance.    I 
>>>>>>>>>>>> have not noticed any problem with Single Table Inheritance.
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>>> Any pointer about where to look at to ensure proper horizontal 
>>>>>>>>>>>>> inheritance SQL generation under 5.4?
>>>>>>>>>>>> 
>>>>>>>>>>>> Based on your evidence, I'd search for "primary" in ERExtensions.  
>>>>>>>>>>>> If nothing else, that will at least show you were in EOF the PK 
>>>>>>>>>>>> generation  happens.
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Chuck
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>>> On 31 janv. 2011, at 18:57, Dev WO wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I don't really know where the issue come from, but here's what's 
>>>>>>>>>>>>>> happening and what I've already tried to fix it (without a 
>>>>>>>>>>>>>> solution so far).
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I'm using Eclipse 3.6.1.M20100909 cocoa 64
>>>>>>>>>>>>>> WOLips 3.6.6215
>>>>>>>>>>>>>> PostgreSQL 8.4
>>>>>>>>>>>>>> WO 5.4.3
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> My previous setup was WO 5.3.3 with the previous major version 
>>>>>>>>>>>>>> of Eclipse (Carbon) and WOLips. The following behavior wasn't 
>>>>>>>>>>>>>> happening in this setup.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I've got an Abstract entity A and a couple sub-entities, let's 
>>>>>>>>>>>>>> say SubA1 and SubA2.
>>>>>>>>>>>>>> In the previous setup, when I generated the SQL for them, they 
>>>>>>>>>>>>>> were both correctly referring to A_seq for their primary key 
>>>>>>>>>>>>>> generation (in EntityModeler when generating SQL and while the 
>>>>>>>>>>>>>> app was running).
>>>>>>>>>>>>>> Now they are referring to SubA1_seq and SubA2_seq (in 
>>>>>>>>>>>>>> EntityModeler and while the app is running) which breaks the 
>>>>>>>>>>>>>> entire application by providing pk that might be already taken 
>>>>>>>>>>>>>> by the other sub-entity...
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I first thought it could come from the PosgreSQL plugin 
>>>>>>>>>>>>>> framework, but after putting back my previous one, the issue is 
>>>>>>>>>>>>>> still there (cleaned the project after "updating" the framework).
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I'll will update WOLips right away to check if it changes 
>>>>>>>>>>>>>> anything, but if anyone has an idea on what might cause this 
>>>>>>>>>>>>>> issue and even better how to fix it to respect entity 
>>>>>>>>>>>>>> inheritance, that would be really nice:)
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Xavier
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> 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/webobjects%40anazys.com
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 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/chill%40global-village.net
>>>>>>>>>>>>> 
>>>>>>>>>>>>> This email sent to [email protected]
>>>>>>>>>>>> 
>>>>>>>>>>>> -- 
>>>>>>>>>>>> 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      ([email protected])
>>>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com
>>>>>>>>>>> 
>>>>>>>>>>> This email sent to [email protected]
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>> 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
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> -- 
>>>>> 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
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>>> -- 
>>> 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      ([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]

Reply via email to