Magnificent - Scott you are a gentleman and an acrobat sir, thank you muchly!
cheers, Toby On Friday 24 February 2006 08:53, Scott Talsma wrote: > Toby--I found the reference I was looking for. Have a look at > parseArrayProperty() in fourQ/TableMetadata.cfc > > Basically, set your property in the cfc as follows: > > <cfproperty name="myprop" type="array" > arrayProps="id:number;fname:nstring;lname:nstring;city:nstring" /> > > That will create your table w/ 4 columns of the appropriate type. > > > Scott Talsma > CTO > echo.eleven > 404.845.3458 > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Scott Talsma > Sent: Thursday, February 23, 2006 8:33 AM > To: [email protected] > Subject: [farcry-dev] Re: array of structs in an object property > > > I don't actually remember how to do this, but I have done it before, and it > works quite elegantly. The trick is to specify the properties of the > structure you are storing in the array when you declare the property > (cfproperty) in your custom type. The array table will then have the > appropriate columns. Have a look at /fourQ/gateway/MSSQLGateway > > Maybe search farcry_core for type="array" to see if any of the built-in > types use this feature. Or try to find the code that parses the > cfc.getMetaData() results. It would specify how complex arrays are > defined. > > Toby Tremayne wrote: > >Oh I'm storing it in memory fine, it's just when I want to put it in > >the database it will only work if it's a string, not a structure. Is > >there anything I haven't found yet that will allow for a structure? > > > >cheers, > >Toby > > > >On Thursday 23 February 2006 18:15, Geoff Bowers wrote: > >>Actually as of 3.0 fourq was extended to accommodate extended array > >>data whicyh would allow you to do what you are after. Unfortunately > >>this is totally undocumented feature. > >> > >>Sorry about that -- you would need to crawl around int he fourq code > >>to work this out. > >> > >>-- geoff > >>http://www.daemon.com.au/ > >> > >>Shib71 wrote: > >>>No. FarCry property arrays are basically arrays of 255char strings. > >>>If you want something bigger or more complex, you would be better off > >>>using a longchar property and storing WDDX. > >>> > >>>Blair > >>> > >>>On 2/23/06, *Toby Tremayne* <[EMAIL PROTECTED] > >>><mailto:[EMAIL PROTECTED]>> wrote: > >>> > >>> > >>> Hi all, > >>> > >>> is there any way I can get farcry to correctly store an > >>> array of structures > >>> in a property? For example, myObject.aSubObjects is an arrray, and > >>> I want > >>> each element of the array to contain a structure (the body of a > >>> different > >>> kind of object). Is there a proper way to do this without forcing > >>> me to > >>> > >>> serialize the data? > >>> > >>> cheers, > >>> Toby > -- ---------------------------------------- Life is poetry, write it in your own words ---------------------------------------- Toby Tremayne Senior Technical Consultant Code Poet and Zen Master of the Heavy Sleep Lyricist Software 0416 048 090 ICQ 13107913 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
