• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Vertical inheritance bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Vertical inheritance bug


  • Subject: Vertical inheritance bug
  • From: Alexis Tual <email@hidden>
  • Date: Thu, 30 May 2013 13:03:09 +0200

Hi list,

this one is tedious, in a framework, we have a model with an abstract entity "Composant" and subentities "Ap" and "Ue" mapped with vertical inheritance.
In one application, this works with no error.
In another app, we have a SQL error when a instance of Ap and Ue are inserted and saved :
----> SQL for AP insertion is OK :
INSERT INTO SCO_SCOLARITE.COMPOSANT(ID_COMPOSANT, CODE, LL_COMPOSANT...
INSERT INTO SCO_SCOLARITE.AP(TYPE_AP_ID, SEUIL, NB_GROUPES...

----> SQL for Ue insertion is not OK :
INSERT INTO SCO_SCOLARITE.COMPOSANT(ID_UE, CODE, LL_COMPOSANT...

It should be ID_COMPOSANT...

So, I took my jd and digged down EOF, here's my found :
when generating SQL, ERXEntity#anyAttributeNamed is called in EOSQLExpression#prepareInsertExpressionWithRow.
In this method, when EOEntity#anyAttributeNamed is called for the attribute 'NeededByEOF0' of AP, it returns the right thing :

<EOAttribute NeededByEOF0
name : 'NeededByEOF0'
definition : 'sco_Composant.id'
className : 'java.lang.Number'
externalType : 'NUMBER'
valueType : 'i'
precision : '38'
>

whereas for the same attribute of UE, it returns null.. and this explains why the primary key of the subentity is taken instead of the one from the parent...
So why it returns null ? The responsible is attribute EOEntity#_attributesToSave which is somehow unset...

Lachlan Deck or anyone, any ideas ?

Any help is appreciated, 

Alex




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Vertical inheritance bug
      • From: Alexis Tual <email@hidden>
  • Prev by Date: ERRest and filter relationship
  • Next by Date: Re: Vertical inheritance bug
  • Previous by thread: ERRest and filter relationship
  • Next by thread: Re: Vertical inheritance bug
  • Index(es):
    • Date
    • Thread