You can override most of cake's model conventions.

var $useTable = 'tblSomethingCrazy';
var $primaryKey = 'num';
var $displayField = 'str_name';

And when creating associations be sure to specify all of your join
table and field names (joinTable, foreignKey, foreignKeyAssoc).

Hope this helps.

Cheers,
Adam

dietcheese wrote:
> Hi all,
>
> I've very new to CakePHP and probably in way over my head.
>
> I am using two databases, one is a mysql database which strictly
> follows Cake's naming conventions and is working great so far.
>
> However, the other is a MS-SQL database, of which the tables and keys
> follow no conventions and cannot be changed.  This is the database I
> need to access.
>
> I'm connecting to the MS-SQL database fine, I simply want to know how
> to properly create a MVC to access records in this database.
> Additionally, is there a way to map an unconventionally-structured
> table so that it can take advantage of Cake's automagical abilities?
>
> I've been searching for hours and I still can't seem to get a simple
> select statement to function.
>
> I am properly using the useDbConfig variable to access the second
> database but my model, which is named Test, gives me a "Missing
> Database Table, No Database table for model Test (expected "tests"),
> create it first." error.
>
> I would really appreciate a quick example.
>
> Thanks,
> DC
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to