Re: Array of Objects to Array of Global IDs ?
Re: Array of Objects to Array of Global IDs ?
- Subject: Re: Array of Objects to Array of Global IDs ?
- From: James Cicenia <email@hidden>
- Date: Tue, 6 Nov 2007 07:24:51 -0600
The problem would be then to parse back the qualifiers...
When the user selects a saved query, they want to see it when they
restore it. So I have to repopulate all the query fields. Plus some
of these D2W custom query components I wrote to a bunch of many-to-
many searches with subqueries, etc.
Now I had previously stored the binding dicts etc, in the database
and that worked fine. These custom query components are much more
complicated so I figured this was the best way.
I finished the storing of all the queries last night,,, now I have to
bring them back.. if it works it should do the job.
James
On Nov 5, 2007, at 9:23 PM, Ken Anderson wrote:
James,
When doing something similar a while ago, I found that trying to
persist saved queries into the database was more trouble than its
worth. What I ended up doing was saving them to the file system,
and doing something similar to what you're trying - stored the
global ID. The nice thing is though, you can persist a
hierarchical structure of EOQualifiers into a file much more easily
than a table structure.
A good compromise would be to persist the eo qualifiers as text,
then store THAT in a single blob in the database. You'd also gain
the ability to version your structures, so that you could handle
loading old queries, etc.
Ken
On Nov 5, 2007, at 8:22 PM, James Cicenia wrote:
Well I have a query and reporting system. The user can select
multiple eos from a list, etc., a query is then created, but now I
have to store the query into a database. So.. don't I need to
store the users eo selection via the global ids?
I realize I could model the reports differently but I have been
saving all the queries in a archivable mutable array or dict.
These new custom query components need to be saved too, so I
figure the global ids and the dictionaries to keep in consistent.
James
On Nov 5, 2007, at 6:57 PM, Owen McKerrow wrote:
Hi James
I think you'll find you don't need to touch the global ID's at
all. Yes there is a way you could extract them, but I wasn't
going to tell you until we'd determined that you really really
need to do it. However Chuck explained how :D
Can you explain what exactly it is you are trying to do. Such as
how is the list of object being selected in the first place ?
What are the objects ? Im assuming they are EO's ?
Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
"As of tomorrow, employees will only be able to access the
building using individual security cards. Pictures will be taken
next Wednesday employees will receive their cards in two weeks."
- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp
On 06/11/2007, at 11:49 AM, James Cicenia wrote:
Hello -
I need to save selection of objects in my database. In order for
me to do that
do I have to first extract their global ids and then store those?
If so is there a magic one line of WebObjects code that gives me
the ids?
Thanks
James Cicenia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40uow.edu.au
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:
40anderhome.com
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