Displaying 20 results from an estimated 22 matches for "hmt".
Did you mean:
fmt
2006 Jun 05
7
Is HABTM Dying?
For a while, I''ve been getting that HMT is replacing HABTM. It appears that
HMT can do all of what HABTM can do and more. The question is: Should I stop
using HABTM? Let''s take a simple case:
A case has many categories
For a given category, there are certain valid statuses
Category
has_and_belongs_to_many :statuses
Status
has...
2009 May 11
0
updating join table (HMT) with checkbox and extra fields
Hi,
I''ve been breaking my head over this thing with no success. Here is my
table layout -
class User < AR
has_many :memberships
has_many :groups, :through => :memberships
...
class Group < AR
has_many :memberships
has_many :users, :through => :memberships
...
class Membership < AR
belongs_to :user, :class_name => "User", :foreign_key =>
2006 Jul 10
7
What is has_many :through really buying you over HABTM?
So having just learned how to do has_many :through as opposed to HABTM,
and then, being concerned that I wouldn''t get it to work, I started
thinking about these two approaches.
It seems to me that the _only_ problem that the HM:T (has_many :through)
approach solves that HABTM doesn''t is the issue of the potential
collision of id columns between your join table and one of
2007 Oct 15
0
converting from HABTM to has_many :through
Hello,
I have a has_and_belongs_to_many relationship that I''ve realized I need
to add additional attributes to. So I''m converting it to a has_many
:through (HMT) relationship. This is the first time I''ve used an HMT,
and it seems like I''m using too much code. I couldn''t figure out how to
get the join model objects to update automatically as a result of
updating the primary object, so I''ve ended up doing individual
saves/...
2006 May 24
2
Has Many Through + Join Model + Forms + Confused?
Hello,
I''m trying to implement something like the following scenario. I''ve got
"Alloys" (blends of metals), "Metals" and "Percentages" I want to implement
this using a join model, not using a has_and_belongs_to_many relationship.
(If i''m wrong about that, let me know).
Basically, i have the following tables:
Metals
id
name
Alloys
2006 Jul 04
1
Has_many :through with checkboxes?
...many :through type relationships.
One example, pairing users with categories via subscriptions, where
each user can be the "owner" of a category, has given me particular
trouble when I try to update a user''s category subscriptions.
**Has anyone figured out how to manipulate HMT relationship with
checkboxes?**
=begin code
## Here''s what my models look like:
## user.rb
has_many :subscriptions
has_many :cats, :through => :subscriptions
## cat.rb
has_many :subscriptions
has_many :users, :through => :subscriptions
## subscription.rb
belongs_to :user
bel...
2020 Jul 05
1
[PATCH v2 5/6] powerpc/pseries: implement paravirt qspinlocks for SPLPAR
...queued_spin_unlock
static inline queued_spin_unlock(struct qspinlock *lock)
{
??????? if (!is_shared_processor())
??????????????? smp_store_release(&lock->locked, 0);
??????? else
??????????????? __pv_queued_spin_unlock(lock);
}
Otherwise, pv_kick() will never be called.
Maybe PowerPC HMT is different that the shared cpus can still process
instruction, though slower, that cpu kicking like what was done in kvm
is not really necessary. If that is the case, I think we should document
that.
Cheers,
Longman
2007 Sep 16
4
How far to go with ActiveRecord unit tests without hitting the database?
I''m currently try to push my limits a little bit with some of my unit
testing -- trying to avoid saving ActiveRecord objects to the database and
take advantage of mock/stub objects.
How far should I expect to get in this direction? From what I can tell,
ActiveRecord seems to fight me when it comes to associations. In other
words, many associations seem to require database queries.
2006 Jun 04
0
[SUMMARY] Rails Core Weekly May 29 - June 4
...ago choonkeat alerted the list that patch #5216 actually
makes habtm resilient against the existence of extra attributes
messing up the normal ops of habtm. However habtm is reaching the end
of its product lifecycle (i.e. don''t use it anymore, use has_many
:through, affectionately known as hmt) and this patch might not be
needed anymore. But Rick Olson thnks this patch might in fact help
people migrate ot hmt. choonkeat still feels hte patch should be
applied to make habtm behave correctly in spite of an extra column
being present. The jury is still out on this one.
[ thread: http://www...
2010 Jul 11
10
dependent support for has_many through?
Given the following
class Programmer < ActiveRecord::Base
has_many :assignments
has_many :projects, :through => :assignments
end
if I call Programmer#projects.clear, it will delete_all the joining
assignments; however, I have a situation where I''d like the
assignments to get destroyed instead so that their after_destroy
callbacks get called. It would be simple to
2006 Jul 10
10
has_many :through and foreign key parameters
I just took my HABTM and turned it into a :through since my join table
has another "non-joiny" attribute.
I went from this:
has_many_and_belongs_to :jobs, :join_table => ''tablename'',
:foreign_key => ''x'',
:association_foreign_key => ''y''
to this:
has_many :jobs, :through =>
2006 May 30
3
extra attributes in habtm
Hi,
Posting here since issue tracking isn''t the best place to discuss.
I can understand habtm is moving towards deprecating support for extra
attributes in join_table, and to use :through for those cases instead.
To clarify, patch<http://dev.rubyonrails.org/attachment/ticket/5216/habtm_join_table_test.patch1.diff>for
#5216 <http://dev.rubyonrails.org/ticket/5216>
2010 Dec 23
0
has_many :through full stack help
I am trying to implement HMT for the first time and having a ton of
trouble. I would like to be able to have the user check a checkbox
and fill some extra fields for data input. I have tried so many
iterations borrowed from different places I found on the web, none
seem to work quite right. Essentially I have two models: ...
2006 Jul 10
4
HABTM vs. using has_many :through
All,
I''ve heard recently about has_many :through as a necessary alternative
to HABTM (when the join table has it''s own id column, say, in a legacy
schema). However, is the prevailing Rails wisdom now that one should
use has_many :through in _all_ cases?
If so, why?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2010 Jan 27
2
has_many, through with nested models?
...ums, :through => :topics, :uniq => true
has_many :forums, :through => :comments, :uniq => true
has_many :forums, :through => :replies, :uniq => true
end
I dont think so... Only the Topic model is directly associated with
the Forum.
Is there a clean way to do a HMT association on multiple, nested
associations like this?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from t...
2012 Feb 14
4
What I'm doing wrong, has_and_belong_to_many
Hello, I''m trying to insert into my migrate but when I try on rails
console this error shows:
1.9.3-p0 :001 > group = Group.new
=> #<Group id: nil, name: nil, description: nil, created_at: nil,
updated_at: nil>
1.9.3-p0 :002 > group.name = "Group Name"
=> "Group Name"
1.9.3-p0 :003 > group.description = "Description"
=>
2008 Feb 12
8
has_many through question
I have made 3 tables
+------------+ +----------------+ +------------+
|people | |people_campaigns| |campaigns |
+------------+ +----------------+ +------------+
|id :int | <----> |people_id :int | /-> |id :int |
|name :string| |campaign_id :int| <-/ |name :string|
|etc ... | |exported :int |
2019 Oct 04
0
[RESEND TRIVIAL 3/3] treewide: arch: Fix Kconfig indentation
...10 boards come with the
resistors fitted so that the card detects for
channels 0 and 1 are the same.
@@ -257,7 +257,7 @@ config MACH_NCP
select S3C_DEV_HSMMC1
select S3C_DEV_I2C1
help
- Machine support for the Samsung NCP
+ Machine support for the Samsung NCP
config MACH_HMT
bool "Airgoo HMT"
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 301e572651c0..99ae92fa452a 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -250,7 +250,7 @@ config S3C_PM_DEBUG_LED_SMDK
bool "SMDK LED suspe...
2020 Jul 03
7
[PATCH v2 0/6] powerpc: queued spinlocks and rwlocks
v2 is updated to account for feedback from Will, Peter, and
Waiman (thank you), and trims off a couple of RFC and unrelated
patches.
Thanks,
Nick
Nicholas Piggin (6):
powerpc/powernv: must include hvcall.h to get PAPR defines
powerpc/pseries: move some PAPR paravirt functions to their own file
powerpc: move spinlock implementation to simple_spinlock
powerpc/64s: implement queued
2003 Oct 14
4
Printing Issues with NT type Clients.
Hi. To begin with, I have a freshly built RedHat Linux 8.0 box running samba 2.2.8a. The kernel version is 2.4.18-14. I downloaded and compiled samba from source. I am using LPRng-3.8.9-6 as my printing system. The attached printer is a Lexmark Z22 printer and it is attached to the parralel port.
Problem:
For the life of me, I can't get NT type clients, NT4, 2K and XP to print to samba.