search for: t1_r3

Displaying 18 results from an estimated 18 matches for "t1_r3".

Did you mean: t1_r0
2006 May 16
1
:conditions on has_one realationship
...people that have an active membership in table memberships. As far as I can tell this should generate this SQL:- SELECT people.`id` AS t0_r0, people.`firstname` AS t0_r1, people.`surname` AS t0_r2, memberships.`id` AS t1_r0, memberships.`person_id` AS t1_r1, memberships.`startdate` AS t1_r3, memberships.`enddate` AS t1_r4 FROM people LEFT OUTER JOIN memberships ON memberships.person_id = people.id WHERE memberships.id is not null and memberships.enddate > now() ORDER BY enddate DESC However the SQL that is generated does not appear to be correct. The SQL that is generated...
2006 Jun 25
2
how to write the codes in view?(newbie question)
...links_Controller is like below. def list @links = Genre.find(:all,:include => :link) end Below is the mysql log. SELECT genres.`id` AS t0_r0, genres.`genre_n ame` AS t0_r1, genres.`genre_order` AS t0_r2, links.`id` AS t1_r0, links.`genre_ id` AS t1_r1, links.`name` AS t1_r2, links.`symbol` AS t1_r3, links.`url` AS t1_ r4, links.`order` AS t1_r5, links.`display` AS t1_r6, links.`etc` AS t1_r7 FROM genres LEFT OUTER JOIN links ON links.genre_id = genres.id But I don''t know the way to show them in the view. How do I have to write the code in the view(list.rhtml) to get the contents(n...
2006 Jan 09
3
Include with two references of one model of the same table
...; AS t2_r6, matches."awayteam_goals" AS t1_r1, teams_seasons."id" AS t0_r0, matches."season_id" AS t2_r7, matches."hometeam_goals" AS t1_r2, teams_seasons."team_id" AS t0_r1, matches."league_id" AS t2_r8, matches."awayteam_id" AS t1_r3, teams_seasons."season_id" AS t0_r2, matches."venue_id" AS t2_r9, matches."division_id" AS t1_r10, matches."hometeam_id" AS t1_r4, teams_seasons."coach_id" AS t0_r3, matches."division_id" AS t2_r10, matches."id" AS t2_r0, matches...
2007 May 22
2
find :all :include broken on Oracle 10
...AS t0_r3, publications.lang AS t0_r4, publications.keywords AS t0_r5, publications.cvsdir AS t0_r6, publications.publishername AS t0_r7, publications.publisherorg AS t0_r8, publications.release_state_id AS t0_r9, doc_types.id AS t1_r0, doc_types.code AS t1_r1, doc_types.en AS t1_r2, doc_types.es AS t1_r3, doc_types.sv AS t1_r4, doc_types.descr AS t1_r5, release_states.id AS t2_r0, release_states.code AS t2_r1, release_states.name AS t2_r2, release_states.descr AS t2_r3 FROM publications LEFT OUTER JOIN doc_types ON doc_types.publication_id = publications.id LEFT OUTER JOIN release_states ON relea...
2006 May 20
3
In a find, can''t you use both :include and :limit ?
...es.`comments` AS t0_r7, employees.`creation_date` AS t0_r9, employees.`last_update` AS t0_r10, employees.`is_featured` AS t0_r11, employees.`is_deleted` AS t0_r12, employees.`is_hidden` AS t0_r13, skills.`id` AS t1_r0, skills.`parent_id` AS t1_r1, skills.`name` AS t1_r2, skills.`desc_short` AS t1_r3 FROM employees LEFT OUTER JOIN skills_employees ON skills_employees.recipe_id = employees.id LEFT OUTER JOIN skills ON skills.id = skills_employees.skill_id WHERE (skill_id = 3) But remember, I want to use this in a Pagination scenario, and that''ll require :offset and :limit. Let'&...
2006 May 23
5
AR Caching and Reflection
When I do this: term = Term.find(1, :include => :definition) term.definition.term Two SQL queries are fired, why? -- Posted via http://www.ruby-forum.com/.
2006 Jul 17
1
acts_as_tree and :include
...ies.`email` AS t0_r2, gb_entries.`homepage` AS t0_r3, gb_entries.`message` AS t0_r4, gb_entries.`created_at` AS t0_r5, gb_entries.`parent_id` AS t0_r6, childrens_gb_entries.`id` AS t1_r0, childrens_gb_entries.`name` AS t1_r1, childrens_gb_entries.`email` AS t1_r2, childrens_gb_entries.`homepage` AS t1_r3, childrens_gb_entries.`message` AS t1_r4, childrens_gb_entries.`created_at` AS t1_r5, childrens_gb_entries.`parent_id` AS t1_r6 FROM gb_entries LEFT OUTER JOIN gb_entries childrens_gb_entries ON childrens_gb_entries.parent_id = gb_entries.id WHERE gb_entries.id IN (''30'', '...
2006 Apr 19
2
I need help in ActiveRecord..
I have this Product.find(:all, :include => [:brand, :category, :type], :group => "description"), but it dont group by description why? Bruno -- Posted via http://www.ruby-forum.com/.
2006 Mar 14
3
cascading eager loading patch not working in oracle
...5: missing keyword: SELECT tim esheets.id AS t0_r0, timesheets.start_date AS t0_r1, timesheets.status AS t0_r2, timesheets.cost AS t0_r3, timesheets.charge AS t0_r4, timesheets.employee AS t0 _r5, employees.id AS t1_r0, employees.name AS t1_r1, employees.start_date AS t1_ r2, employees.cost AS t1_r3, employees.charge AS t1_r4, employees.username AS t1..... I have just installed edge rails. -- Posted via http://www.ruby-forum.com/.
2006 Feb 19
2
Another "escaping" problem
Ruby 1.8.2, edge Rails (and 1.0), Mac OS X 10.4.3. Here''s the SQL that gets generated for an eager load: SELECT events.`id` AS t1_r0, events.`user_id` AS t1_r1, addresses.`id` AS t0_r0, events.`name` AS t1_r2, addresses.`name` AS t0_r1, events.`meet_at` AS t1_r3, addresses.`phone_number` AS t0_r2, events.`created_at` AS t1_r4, addresses.`phone_service` AS t0_r3, events.`location_id` AS t1_r5, addresses.`user_id` AS t0_r4 FROM addresses [" LEFT OUTER JOIN addresses_events ON addresses_events.address_id = addresses.id LEFT OUTER JOIN events ON add...
2006 Feb 22
5
Optional Include Relationship
I did some searches in the mailing list and on the web but I can''t seem to find the answer to this, but it''s pretty much a noob question. I have a Product object class Product < ActiveRecord::Base has_many :product_identifications has_one :product_identification_item_number has_one :product_identification_product_code end the product_identifications is using
2006 Apr 10
1
random | in join statement with more than one :include
...ed_at` AS t0_r25, grants.`updated_on` AS t0_r26, grants. `lock_version` AS t0_r27, grants.`created_by` AS t0_r28, grants.`updated_by` AS t0_r29, sponsor_agencies.`id` AS t1_r0, sponsor_agencies.`name` AS t1_r1, sponso r_agencies.`address` AS t1_r2, sponsor_agencies.`phone` AS t1_r3, sponsor_agenci es.`contact_name` AS t1_r4, sponsor_agencies.`created_at` AS t1_r5, sponsor_agen cies.`created_on` AS t1_r6, sponsor_agencies.`updated_at` AS t1_r7, sponsor_agen cies.`updated_on` AS t1_r8, sponsor_agencies.`lock_version` AS t1_r9, sponsor_ag encies.`created_b...
2005 Dec 29
1
Resolving ambiguous columns during a join
I am working with an existing schema and thus limited in how much I can bend my existing column names. I have a table Users, and a table ForumUsers, for which I have a "has_one" relationship - a user has_one forumuser. When I look at my user records I wish to include some information from forumuser: @users = User.find :all, :include => :forum_user, :order =>
2006 Jan 31
4
Rails bug? Conditions on associations ignored by eager loading
..._posts).first.published_posts returns all the posts for the blog, not just the published ones. The SQL generated looks like this: SELECT posts.`id` AS t1_r0, posts.`blog_id` AS t1_r1, blogs.`id` AS t0_r0, posts.`subject` AS t1_r2, blogs.`name` AS t0_r1, posts.`content` AS t1_r3, posts.`published` AS t1_r4 FROM blogs LEFT OUTER JOIN posts ON posts.blog_id = blogs.id The following, on the other hand, returns just the posts marked as published: Blog.find(:all).first.published_posts If anyone wants a simple sample project to test this, let me know and...
2013 Oct 08
4
'puppet storeconfigs export' killed
...pile` AS t0_r4, `hosts`.`last_freshcheck` AS t0_r5, ` hosts`.`last_report` AS t0_r6, `hosts`.`updated_at` AS t0_r7, `hosts`.`source_file_id` AS t0_r8, `hosts`.`created_at` AS t0_r9, `resources`.`id` AS t1_r0, `resources`.`title` AS t1 _r1, `resources`.`restype` AS t1_r2, `resources`.`host_id` AS t1_r3, `resources`.`source_file_id` AS t1_r4, `resources`.`exported` AS t1_r5, `resources`.`line` AS t1_r6, `resources `.`updated_at` AS t1_r7, `resources`.`created_at` AS t1_r8, `param_values`.`id` AS t2_r0, `param_values`.`value` AS t2_r1, `param_values`.`param_name_id` AS t2_r2, `param_values`.` l...
2006 Jul 04
13
NewBie question
Hi, I m very new to Ruby. I bought a book "Ruby on Rails" and I think I understand some concepts. My question is : Is there a way to not use "Cookies" or "Sessions Variables" to keep some information about the user. I ask this question because I would like to prevent some cases where the user browser won''t accept cookies. I m from Asp 3.0, and I
2006 Mar 15
8
Tags to ruby interface: What I am missing? (repost)
I offer my apologies in advance for the repost. On a list as busy as this, it is sometimes easy to get missed in the shuffle. I am trying to create, display and edit a referenced object''s text field on the same view as my root object. For example: ------------------------- Quiz: <<quiz.name>> Preamble: <<quiz.preamble_presentation.text>> Postamble:
2010 Jul 08
25
Prepared SQL statements
Dear all great developers. I wonder if there is any work being done or thoughts being shared regarding prepared SQL statements. Currently I am in heavy need of tuning SQL INSERTS that insert large (3MB) images into blobs. I am using rails 2.3.5 with postgres adapter and pg driver. Any information would be appreciated. Jarl -- You received this message because you are subscribed to the