similar to: Foreign keys not showing!

Displaying 20 results from an estimated 9000 matches similar to: "Foreign keys not showing!"

2006 Jul 15
1
Relationship problem, newbie problem, need help!!
Hey all I seem to be having some problems with my relationship between a few tables... If i then run the following query in mysql, i get the data i want. How do i do this in rails relationships and models? select * from shop_addresses left join shops on shops.id = shop_addresses.shop_id left join styles on styles.id = shops.style_id where shop_uri = ''127.0.0.1'' Cheers!!
2005 Nov 28
1
has_one / HABTM relationship overlap - please advise
1. I have a few tables: ''users'', ''shops'', ''addresses'', and ''pictures''. 2. Users and Shops will both use the addresses and pictures tables. I have created several mapping tables: addresses_shops pictures_shops addresses_users pictures_users 3. Users CAN have many addresses and pictures (simple HABTM), but... 4.
2006 Apr 06
4
using two foreign keys to the same table
i am working on a task manager with ruby on rails. it is my first major project, so i''m still gettng my feet wet as i learn. i''ve been trying to use the built in relationships to link my tables together, but i''m not able to use the same naming conventions. for each task, it has a field for the creator, and another field for the assignee. both of these fields
2006 Jan 13
4
missing foreign key fields in scaffold views
Is there any reason that foreign key fields do not show in any of the scaffold views ? project table: id serial primary key, category_id integer, user_id integer, name varchar, morestuff varchar foreign key (category_id) references categories(id), foreign key (user_id) references users(id) scaffold generated views only show name, morestuff fields
2006 Feb 18
3
scoped databases need explanation...
Could someone explain this http://blog.leetsoft.com/articles/2005/10/31/scoped-databases in a way that can be understood with an example if possible. Tobi Lutke has started to explain but it does not make any sense. "Since rails 0.13.1 we support calling class methods over associations." what?? give an example. also "The Shop object is figured out at the beginning of each
2006 May 24
4
AR foreign key problem.
Hello Railslist, (I''m using RadRails 0.6.3 on Windows XP with Ruby 1.8.4, Rails 1.1 and SQLite3) I have two tables in the database: "locations" and "customers": customers.sql --- id INT PRIMARY KEY name VARCHAR 255 address VARCHAR 255 postal_code VARCHAR 255 city VARCHAR 255 --- locations.sql --- id INT PRIMARY KEY postal_code TEXT longitude FLOAT latitude FLOAT
2005 Dec 25
3
SQLite primary key schema
So after successfully getting the test SQLite db to run from memory, I tried running some tests but found that somewhere in the schema translation from Postgres (my devel database) and SQLite Rails fails to properly set the ''id'' column, which breaks all kinds of things. Take as an example my ''users'' table. In Postgres the schema is (generated with pgAdmin III):
2006 Mar 15
10
Scaffold with Foreign Key
I have two tables: ------------------------------ drop table if exists users; create table users ( id int not null auto_increment, username varchar(100) not null, password varchar(20) not null, firstname varchar(20) not null, lastname varchar(20) not null, primary key (id) ) TYPE = InnoDB; ------------------------------ drop table
2006 Nov 27
0
how to select with a kind of through relation(has_one)
I have a select issue with my members, my database structure is below User has many shops Shop belongs to a membership Shop has many items For front page I want to show items where membership of the shop has ad_enabled and this is what I have in mind but it returns with "Association named ''membership'' was not found; perhaps you misspelled it?" I tried to add to Item
2006 Jun 23
2
Foreign key - relations
Hello, I''ve got DB like this: (roughly) create table projects ( id int auto blabla, name varchar(200), user_id int, sales_id int); create table users ( id int auto.., name varchar(50)); So project.user_id has a foreign key to user.id - all is good. Everything works fine. Now my question.. How can set a relationship from two different fields to the users table ?? Fx.
2005 Dec 27
3
Trouble combining :has_many, :finder_sql and :conditions to create a sub-search
I''m sure there''s something right under my nose that I''m missing. I have two tables with two parallel one-to-many relationships. I wish to use the :finder_sql parameter to essentially ''or'' the two foreign keys. What isn''t working for me is performing a ''sub-search''. Let''s say the tables are "stores" and
2006 Sep 29
1
newbie Q: it won't display foreign keys...
I have two tables CREATE TABLE continents ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE countries ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, continent_id int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; I generate scaffolds for country and for
2019 Jan 04
1
Unexpected accounts showing up in replication status (doveadm replicator status '*')
I have a replication set up with two dovecot 2.3.4 servers. Messages appear to be replicating fine between them, however there is an oddity when I run doveadm replicator status '*' and I'm worried work is being carried out needlessly. Both machines have identical configs and have a mysql backend for username/passwords.? Both machines point to the same mysql server and same
2007 Aug 09
1
usage of each field
Hi all, From the web, I can find a table scheme of sipusers for ARA using. However, I can't find any meaning of each field, especially for the field regserver which is new in the table. Can any tell me more detail about the usage of each field? CREATE TABLE `sip_buddies` ( `id` int(11) NOT NULL auto_increment, `name` varchar(80) NOT NULL default '', `host` varchar(31) NOT NULL
2004 Dec 14
3
Problems with app_realtime
It seems that when setting qualify = 200 or qualify = yes in the database for a sip friend/peer, RealTime does not update the registration status like it should. I also have several peers which have been offline and Asterisk still reports them as registered, even though the registration seconds are only 200. Asterisk Ver: CVS HEAD 12/1/2004 Layout of sip_buddies: mysql> describe
2005 Mar 24
1
realtime - unable to find key
ok so my table looks like this... REATE TABLE `sip` ( `id` int(11) NOT NULL auto_increment, `name` varchar(80) NOT NULL default '', `accountcode` varchar(20) default NULL, `amaflags` varchar(7) default NULL, `callgroup` varchar(10) default NULL, `callerid` varchar(80) default NULL, `canreinvite` char(3) default 'yes', `context` varchar(80) default NULL, `defaultip`
2002 Jul 18
2
RODBC and Excel Files
Hello, I am trying to play with RODBC library and Excel Files. In my file (doubs.xls) there are 2 spreadsheets: > library(RODBC) > connection<-odbcConnect("Excel Files") > sqlTables(connection) TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 1 F:\\Th?se\\R\\Doubs NA Faune$ SYSTEM TABLE NA 2 F:\\Th?se\\R\\Doubs NA Milieu$
2020 Jun 14
2
Any api (agi/ari/ami) equivalent of "core show calls"?
Wow! I've been *-ing for about 6 years and had literally no idea about that! I can see a way I could put it to a different use, but it seems to be a bit of a sledgehammer to crack the walnut of "how many current callers" compared to one line of (albeit hacky) dialplan. That's making me sound ungrateful. I don't mean to be! On Sun, 14 Jun 2020, 22:39 Steve Edwards,
2006 Jul 22
10
Non English characters
Hi folks, Does anyone know how to tackle Swedish letters in Rails. Am I completely off track in thinking that it should be done using map or regex in some clever way? Bealach
2009 Dec 30
1
CDR_MYSQL 1.4 Database Structure
So I'm noticing from the docs/ on Asterisk Addons 1.4.10 that the database structure for cdr_mysql is: CREATE TABLE cdr ( calldate datetime NOT NULL default '0000-00-00 00:00:00', clid varchar(80) NOT NULL default '', src varchar(80) NOT NULL default '', dst varchar(80) NOT NULL default '', dcontext varchar(80) NOT NULL default '', channel