• 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
AW: help needed with query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: help needed with query


  • Subject: AW: help needed with query
  • From: "Weide, Björn" <email@hidden>
  • Date: Mon, 4 Feb 2008 15:46:34 +0100

Hi Theodore,

this is no big deal I hope. First you have to create a model for your
entities, for example with a names-entity, a businessmetadata-entity and a
to-n-relationship from names to businessmetadata (or is it 1:1?). Then you
generate your code and the rest is simple: create a query on the
names-object with 1 qualifier:

new EOKeyValueQualifier("businessmetadata.isCurrent",
EOQualifier.QualifierOperatorEqual, Boolean.True);

Where businessmetadata is the name of the relationship and isCurrent the
name of the attribute. Hope its right, its just as I am remembering it and
well, its of course simple WO - I am not sure how good you know this stuff
so sorry if I have misunderstood you problem ..

Ciao,
Bjoern

-----Ursprüngliche Nachricht-----
Von: webobjects-dev-bounces+bw=email@hidden
[mailto:webobjects-dev-bounces+bw=email@hidden] Im Auftrag von
Theodore Petrosky
Gesendet: Montag, 4. Februar 2008 14:58
An: email@hidden
Betreff: help needed with query

First, most of my experience is with cocoa. I could write any query I wanted
even across relationships. I am having a problem with relationship in WO.

I am starting out with a new simple setup. My db is normalized like this

table names:
firstname text
lastname text
nameid (serial)

namesbusinessmeta:
iscurrent bool  default true
phonenumber text
extension text
nbmid
namesFKid foreign key to names

I have a trigger and function on the db that creates a new insert into
namesbusinessmeta with the referenced foreign key on insert into the names
table.

This works fine.

but now I want to query from my WO app.
select * from names where nameid in (select namesFKid from namesbusinessmeta
where iscurrent = true) order by lastname;

I am lost.... I want an array of current employees where the iscurrent  bool
is in relationship table.

Maybe I am barking up the wrong tree......

Ted









____________________________________________________________________________
________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
 _______________________________________________
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
 _______________________________________________
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

  • Prev by Date: Re: help needed with query
  • Next by Date: EO saveChanges problem: Field 'id' doesn't have a default value
  • Previous by thread: Re: help needed with query
  • Next by thread: EO saveChanges problem: Field 'id' doesn't have a default value
  • Index(es):
    • Date
    • Thread