Ok got it, like you said, when you use a array or uuid then the
current object is of course the array or uuid table which you have to
address to get foreign keys from which enables you to get the attached
data from other tables:
<!--- set the object --->
<cfset obj =
createObject('component',application.types.polling.typePath) />
<!--- get the pollingdata where the value in "objectid" equals the
value in the (in this case) rulepolling "pollingobjectid" field --->
<cfset pollingdata = obj.getData(stobj.pollingobjectid) />
<cfdump var="#pollingdata#">
On Oct 22, 4:51 pm, Marco van den Oever <[EMAIL PROTECTED]>
wrote:
> I have a "objectid" in polling.cfc
>
> a referring value in "pollingobjectid" in a rulepolling table
>
> On Oct 22, 4:37 pm, Marco van den Oever <[EMAIL PROTECTED]>
> wrote:
>
> > mmmm when i use the folowwing example i get, as it seems, only the
> > type structure and not the db values:
>
> > <!--- get the pollingdata --->
> > <cfset obj =
> > createObject('component',application.types.polling.typePath) />
> > <cfset pollingdata = obj.getData(objectid) />
> > <cfdump var="#pollingdata#">
>
> > what do i miss here?
>
> > thanks
>
> > On Oct 21, 3:31 pm, Marco van den Oever <[EMAIL PROTECTED]>
> > wrote:
>
> > > Now that will ease the pain of creating cfc's, functions, invoking,
> > > WOW
>
> > > Thanks :)
>
> > > On Oct 21, 2:03 pm, Sean Coyne <[EMAIL PROTECTED]> wrote:
>
> > > > <cfset obj =
> > > > createObject('component',application.types.polling.typePath) />
> > > > <cfset test = obj.getData(objectid) />
> > > > <cfdump var="#test#" />
>
> > > > This will get the record from the Polling table where the objectid
> > > > equals the value in the "objectid" variable.
>
> > > > Any array data types will contain the array of IDs and any UUID data
> > > > types in that Polling object will have the UUID to reference the
> > > > related objects.
>
> > > > On Oct 20, 5:38 pm, Marco van den Oever <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > Ok for instance i have this test:
>
> > > > > <cfset test = getData(stObj.ObjectID)>
> > > > > <cfdump var="#test#">
>
> > > > > This will get the values of the current object which is a uuid table
> > > > > structure, but i want to get the values of the polling table named
> > > > > polling (polling.cfc) which objectid is in the uuid table structure.
> > > > > How would i do that?
>
> > > > > Thanks
>
> > > > > On Oct 20, 8:53 pm, Marco van den Oever <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > awesome tomek, I'll go study the usage of this :)
>
> > > > > > Thanks for your time
>
> > > > > > On Oct 20, 3:01 pm, "Tomek Kott" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Marco,
>
> > > > > > > I think this may be what you're looking for:
>
> > > > > > > What you would want to look at for those general functions is
> > > > > > > probably in
> > > > > > > farcry/core/fourq/fourq.cfc. That's what the basic types is
> > > > > > > extended from,
> > > > > > > and hence most of the other types. That said, you can also look
> > > > > > > athttp://www.farcrycore.org/cfcdoc/. I found this some other
> > > > > > > time, and
> > > > > > > although it's only FC5.0.0 (updated Aug 8), it's still useful I
> > > > > > > think. There
> > > > > > > you can browse by components (it doesn't have *all* of the code
> > > > > > > base) and
> > > > > > > search for fourq -> fourq.
>
> > > > > > > If you're putting things on an execute page, I would probably use
> > > > > > > getData to
> > > > > > > get all of the current values, and then replace the ones you
> > > > > > > need, and then
> > > > > > > setData. setData is available to all content types, and you can
> > > > > > > put in any
> > > > > > > combination of proporties to update. createData is used for doing
> > > > > > > things the
> > > > > > > right way.
>
> > > > > > > Once you find a suitable function, you might want to go back into
> > > > > > > your own
> > > > > > > code to make sure it works the same.
>
> > > > > > > Best,
>
> > > > > > > Tomek
>
> > > > > > > On Mon, Oct 20, 2008 at 8:41 AM, Marco van den Oever <
>
> > > > > > > [EMAIL PROTECTED]> wrote:
>
> > > > > > > > Geoff thanks, so you can use the framework to insert and
> > > > > > > > update, but
> > > > > > > > also select? Where can i find info about how to work with that?
> > > > > > > > And what about when you need all kinds of functions that you
> > > > > > > > normally
> > > > > > > > would put in to a functions component, this means that you have
> > > > > > > > to
> > > > > > > > place all that kind of functions on the execute page?
>
> > > > > > > > Tomek thanks, that is also my thought but understanding what
> > > > > > > > Geoff
> > > > > > > > says it's possible to insert and update with the framework
> > > > > > > > directly on
> > > > > > > > the execute page, that probably means that those default values
> > > > > > > > as
> > > > > > > > "createdby" will be filled in automatically and correct.
>
> > > > > > > > It's just a lack of understanding all the possibilities of the
> > > > > > > > framework etc that make me code more difficult then needed,
> > > > > > > > but, we're
> > > > > > > > getting there :)
>
> > > > > > > > On Oct 20, 4:03 am, "Tomek Kott" <[EMAIL PROTECTED]> wrote:
> > > > > > > > > My first brute force thought would be to simply go into the
> > > > > > > > > base type
> > > > > > > > (such
> > > > > > > > > as farcry.core.packages.types.type) and change the default
> > > > > > > > > value there to
> > > > > > > > > something like a space or something.
> > > > > > > > > Maybe I'm not quite understanding you though...
>
> > > > > > > > > Although, you could always just create your own
> > > > > > > > > farcry.projects.packages.types.types and it would overwrite
> > > > > > > > > the default I
> > > > > > > > > believe. Maybe I'm wrong though, never know these days.
>
> > > > > > > > > Tomek
>
> > > > > > > > > On Sun, Oct 19, 2008 at 10:28 AM, Marco van den Oever <
>
> > > > > > > > > [EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > I made i custom type that is not displayed on the site but
> > > > > > > > > > purely used
> > > > > > > > > > as db structure generation through the deploy function.
>
> > > > > > > > > > Automatically all kinds of default fields as "createdby" are
> > > > > > > > > > generated, i know that that is just the way it is and that
> > > > > > > > > > is just
> > > > > > > > > > fine, but how can i provide these fields with default
> > > > > > > > > > (dummy) values
> > > > > > > > > > from a insert query statement?
>
> > > > > > > > > > Anyone has any insight in this? Is it just a manner of
> > > > > > > > > > providing
> > > > > > > > > > correct corresponding data type values (dummy) and thereby
> > > > > > > > > > bypass the
> > > > > > > > > > errors that are generated when no values are provided.
>
> > > > > > > > > > Or am i thinking to difficult?
>
> > > > > > > > > > Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---