• 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
Entity inheritance and sorting: Bug or my fault?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Entity inheritance and sorting: Bug or my fault?


  • Subject: Entity inheritance and sorting: Bug or my fault?
  • From: Guido Neitzer <email@hidden>
  • Date: Sun, 9 Jul 2006 16:45:16 +0200

Hi.

I found a small problem with entity inheritance, which I don't understand. I hope my explanation is not too bad because I hope to get some enlightening comments here ...

I have a base component called "EmbeddedList" that takes an entity name and an initial fetch specification and uses this to build a displayGroup of the objects in the database.

Now, I have the following inheritance in my model:

Contact
	- Company
	- Person
		- InternalUser

So, everything inherits from Contact, but InternalUser is a bit deeper, it inherits from Person.

Now I have two different list components, both extending EmbeddedList. The first ("ContactList") uses "Contact" as its entityName, the second ("UserList") uses "InternalUser" as its entityName.

The fetch specification for both is exactly the same and uses a sortOrdering which orders not on an attribute but on a calculated value called "name". Each Subentity has a method "public String name ()" which returns some appropriate value.

When I use this fetch specification now on my first list with the entity "Contact" it works just fine. When I use it on the second list with the entity "InternalUser" it fails because it tries to generate a sql order by clause for "name" and this fails (as expected).

Why is this the case? Okay, I can see that it might not be a good idea to set a sort ordering on a "non attribute key" in the fetch spec, but why does it work in one case and fails to work in the other?

cug

_______________________________________________
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: Entity inheritance and sorting: Bug or my fault?
      • From: Ian Joyner <email@hidden>
    • Re: Entity inheritance and sorting: Bug or my fault?
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: WWDC WO Meet
  • Next by Date: java.net.SocketException: broken pipe
  • Previous by thread: Re: Webobjects-dev Digest, Vol 3, Issue 412
  • Next by thread: Re: Entity inheritance and sorting: Bug or my fault?
  • Index(es):
    • Date
    • Thread