Rachel,

That is a very good question and one I wish there was better documentation
to help explain.  Of course, there are 50+ ways to tackle this, so you
really need to choose what works best for you.

If you did want to manage the states table in FarCry, then yes I would
suggest creating a states custom type and then reference the two together
using their unique objectIds.  However if you are streaming the data in from
another source (or the states data is being managed somewhere else) then you
bring a dilemma for which you have to make a choice at the fork in the road
:).

There's nothing wrong with taking shortcuts here as long as you take careful
steps to make sure that nothing else will break.

Here's an example of what I mean (next paragraph).  I'm assuming the
"location" record has a one-to-one relationship with the "states" table
(meaning every location can only have one state).  If this is not the case,
then you'll likely want to setup an intermediary relational table (I
sometimes use one of the built-in fourQ array property types.  Which reminds
me... I still have yet to play with the new undocumented compound array
property that launched with FarCry 3.0... But I digress :)).

Example:
In your custom type CFC file, you can add custom methods.  Thus this is a
nice place to have a repository of queries related to your object.  (I like
to place all queries here related to my object to make sure that any DB
changes I make wont effect any queries elsewhere).  So you can make table
joins in your queries here to join your outside data (states) with your
local data (locations) and not have to worry about actually importing the
states DB.

I hope I'm not losing you here :).  Custom types have always been my
favorite feature in FarCry (and I prefer it over containers/rules in most
cases), but it's also the one feature where FarCry requires you to get your
hands a little dirty in ColdFusion (specifically CFCs).

Let me know if that makes sense or if you need further assistance. 

---
Jeff Coughlin
Web Application Developer
http://www.jeffcoughlin.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to farcry-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to