• 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
Re: Single-table inheritance error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Single-table inheritance error


  • Subject: Re: Single-table inheritance error
  • From: Jon Nolan <email@hidden>
  • Date: Wed, 30 Sep 2009 14:33:08 -0600
  • Organization: Loch Garman

Mike Schrag wrote:
java.lang.IllegalStateException: Unable to determine subentity of 'AbstractResource' for row: { ...bunch of attributes... }. Check that the attribute 'resourceType' is marked as a class property in the EOModel and that the value satisfies some subentity's restricting qualifier.

The attribute _is_ marked as a class property and the value _does_ satisfy some subentity's restricting qualifier. This is beyond doubt. I read somewhere once that there's a fluky thing wherein the order of the entities alphabetically within the model matters. Hence my parent entity begins with "A" and is the very first entity in my model. Doesn't help.
is it marked as a class property in every subclass, too?
It is. Is it potentially a problem that it's marked as "allows null" across all entities? I have it this way so as to get the template createResourceX() methods the way I want them with awakeFromInsertion() actually setting the resourceType.

public class Resource2 extends __Resource2 {
   private static Logger LOG = Logger.getLogger(Media.class);

   ...

   public void awakeFromInsertion(EOEditingContext ec) {
       super.awakeFromInsertion(ec);
       setResourceType(ResourceType.Resource2);
   }

}

Also, in case it matters, resourceType is a javaEnum.

_______________________________________________
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: Single-table inheritance error
      • From: Mike Schrag <email@hidden>
    • Re: Single-table inheritance error [SOLVED]
      • From: Jon Nolan <email@hidden>
References: 
 >Single-table inheritance error (From: Jon Nolan <email@hidden>)
 >Re: Single-table inheritance error (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: how different are these urls working?
  • Next by Date: Re: how different are these urls working?
  • Previous by thread: Re: Single-table inheritance error
  • Next by thread: Re: Single-table inheritance error [SOLVED]
  • Index(es):
    • Date
    • Thread