Displaying 20 results from an estimated 800 matches similar to: "n-way joins"
2006 Jan 02
5
DB Modelling the Rails way - Opinions??
Hi,
I''m trying to figure the most efficient way to model the following. I 
can think of at least two ways to relate the tables but from a 
client/server perspective! I''m wondering how to best (and 
elegantly)relate them from an AR perspective.
A project has many people,
A person can work on many projects at any time,
A project has many roles,
A role is performed by a person,
A
2006 Aug 16
3
Question RE Rails associations
Hi,
I am new to Ruby and Rails programming and am having difficulty with the 
following scenario...
Consider the following model:
class Studio < ActiveRecord::Base
   has_many :movies
   has_and_belongs_to_many :actors
end
class Movie < ActiveRecord::Base
   belongs_to :studio
   has_and_belongs_to_many :actors
end
class Actor < ActiveRecord::Base
   has_and_belongs_to_many :studios
2006 Apr 11
3
Validations and has_many :through (Join Models)
Hello again:
I''m hoping that somebody, anybody, can help with this question.
How do I make sure that records in a join model are unique?
Using the scenario outlined in Chad Fowler''s "Rails Recipies", number 
16, "Many to Many Relationships Where the Relationship Iteself Has 
Data".
Here are the tables:
create_table :magazines do |t|
  t.column :title,
2007 Sep 14
2
Testing nested controller
Hey everyone.
I really stuck on testing a nested controller. I''m trying to make a
request using get and afterwards checking the response by
response.should ...
My routes.rb looks like this:
map.resources :writers do |writers|
  writers.resources :notes
end
In my notes_controller_spec.rb
def do_get
  writer_id = 1
  note_id = 1
  get note_path(writer_id, note_id)
end
it "should
2007 Sep 14
2
Testing a nested controller
Hey everyone.
I really stuck on testing a nested controller. I''m trying to make a
request using get and afterwards checking the response by
response.should ...
My routes.rb looks like this:
map.resources :writers do |writers|
 writers.resources :notes
end
In my notes_controller_spec.rb
def do_get
 writer_id = 1
 note_id = 1
 get note_path(writer_id, note_id)
end
it "should show
2006 Aug 15
1
Problem with joining...
Hello,
I am quite new to Rails and i was wondering if i could get some help  
to populate a join table?
I got (for example) a table called films, a table called acteurs and  
a join table called acteurs_films. I have specified the HABTM  
relationship and I manage to do it through the console by doing:
acteur=Acteur.new
acteur.name="blabla"
acteur.films << film
acteur.save
and
2007 Jun 09
7
create 2 fk referencing the same table
Hi everyone! I have a problem with defining 2 fk referencing the same
table. I have a Program table and a Team table. The Program should
have an away team and a home team fk. From my understanding, "the fk
column should be named after the class of the target table, converted
to lowercase, with _id appended". But, in my case, I have 2 fk
referencing the same table. How can I do this?
2012 Jun 25
2
Fast Kendall's Tau
Hello.
Has any further action been taken regarding implementing David Simcha's fast Kendall tau code (now found in the package pcaPP as cor.fk) into R-base? It is literally hundreds of times faster, although I am uncertain as to whether he wrote code for testing the significance of the parameter. The last mention I have seen of this was in 2010
2005 Jun 27
9
FK constraints overrated?
Hello folks,
I use to think that a relational databases without foreign keys 
constraints enforced strictly by the RDBMS were no good, piece of crap, 
data junk.
However, I''ve also learned the hard way that FKs constraints imposes 
serious difficulties when moving data around, specially between 
different DBs, or for loading test data or for upgrading DBs schemas, or 
for porting DBs
2009 Jun 05
1
problem with using subset from two different tables
Hi all,
I am new to R-project my problem is I tried to get subset from two different
tables its giving error
but if i m tring for  geting results from one table its working
actually i have to take values from two tables with applying different
conditions on two tables like
kk- is an object of one table and
fk- is an object of another table
here i have to get values  from these tables like
2007 Nov 22
2
Active Record Question
hey!
I have the following table structure in my DB
|  users   |
------------
|  (pk)id  |
| username |
|   pass   |
------------
     (1:n)
|  users_objects |                 |         objectattributes       |
------------------                 ----------------------------------
| (fk,pk)user_id |      (1:n)      |          (pk)attribute         |
|(fk,pk)object_id|                 | (pk,fk)
2006 Jul 10
8
Setup new data in the test database _after_ unit test runs
All,
I want to run automated unit tests as part of my build.  I am building 
to my test environment.  Upon successful completion of all of my unit 
tests, I would then like to load some data (using a fixture, I imagine) 
into my test database that will act as fresh "system test" data for my 
users to play with.
What is the best way to "load the standard system test/user acceptance
2019 Apr 12
5
players who cannot handle switching to a fallback mount point?
Hi Paul,
Thanks for the quick response!
We use the same type of encoder (Sam Cast) both live for both 
mountpoints on 96 Kb Joint Stereo.
it is difficult to see if it is exactly the same. Is there a player that 
show exactly this? I will check this.
We have use the limit-rate in our config. Thats work better for go to 
play the last fallback-mount file (i test this).
See here our part of the
2009 Sep 08
4
barplot with lines instead of bars
Dear useRs,
I want to plot the following barplot with lines instead of bars. Is there a way?
data <- data.frame(cbind(k = 0:3, fk = c(11, 20,7,2), f0k = c(13.72, 17.64, 7.56, 1.08), fkest = c(11.85, 17.78, 8.89, 1.48)))
d <- t(data[,2:4])
barplot(d, beside=TRUE)
Regards,
Rafael.
      ____________________________________________________________________________________
[[elided Yahoo
2006 Jan 07
4
To Chris Hall - Re: DB Modelling the Rails way - Opinions??
Chris,
Finally got time to fully play with your suggestions. Had to re-code a 
bit of stuff but the concept works - just like a bought one :~). Many 
thanks for the solution,
Kind Regards,
Eric.
For those curious - here''s what it was about;
On Monday 02 January 2006 02:10, Eric Sloane tried to type something like:
 > Hi,
 > I''m trying to figure the most efficient way to
2006 Mar 11
2
assignment of parent ID in child''s fk field
When I create a child record I''m not automagically getting the parent ID put into the fk field.  Does object.new take parameters that allows me to do that as part of the AR record creation?  Or do I need to do it separately?  Or am I missing the boat altogether ;-)
Thanks,
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Apr 13
4
Creating an environment for a function.
I am trying to build a function in a context where the environment
concept would appear to be useful.  But I'm a bit foggy about this
concept and would appreciate some pointers and advice.
Basically the function I'm building, say foo(x,t), is a function of
two variables).  Depending on the value of t, foo will return one of
the values f1(x), f2(x), ..., fk(x), where each of f1, ..., fk is
2006 Aug 30
3
Damaged source medium during rsync
What happens when rsync'ing a file that is damaged bacause of a bad sector on 
the source medium?  I assume that the file will be synchronized partially, 
overwriting any file of the same name on the destination medium.  If that is 
the case, is there a way to make rsync check readability of files before 
overwriting them on the target medium (e.g. by synching to a temp. file and, 
once
2018 Dec 07
3
Implement VLIW Backend on LLVM (Assembler Related Questions)
Hello,
I want to implement LLVM backend for a specific VLIW hardware. I am working
on defining its instruction set, and assembly language.
The hardware has two pipelines, int and float. Each pipeline can do 3
operations/cycle, 3 operations forms an instruction.
One of the Integer Instruction looks like this:
    add Ri, Rj, Rk; add Rl, Rm, Rn; add Ro, Rp, Rq
An int instruction and a float
2007 Aug 02
4
ActiveRecord Limitation (Advance)
Or is it ?
Need to be able to :-
@search =
Form.find(:all, :include=>[:form_type, :form_type_items], :conditions=>....)
I need in the Form model a :form_type_items, the question is, what is
the relationship type?
Current Models:-
Form
belongs_to :form_type
FormType
has_many :form_types
has_many :form_type_items
FormTypeItem
Belongs_to :form_type
Form
----------------
| id           |