Displaying 20 results from an estimated 105 matches for "nullifying".
2006 Jun 07
3
#5209 patch: :dependent => :nullify deletes child records
...noticed a bug with :dependent => :nullify on
a has_many or has_one. When you delete the parent, the children''s
foreign keys are nullified, as expected. But when you do
parent.child.delete or parent.children.clear, ActiveRecord actually
deletes the child records, rather than just nullifying them.
In my eyes, if you''ve set :dependent => :nullify, you''re saying that
the child records should only ever be nullified, not deleted. The
behaviour I''m seeing seems to be a hang over from when
setting :dependent always meant ''delete/destroy the child...
2006 Jul 10
0
Dependent nullify doesn''t use save?
If you have a model that has
has_many :clients, :dependent => :nullify
Will that run the save method for each client or will it just simply
nullify the foreign key using straight SQL without every calling
save. Because I have some very important before_save code in my
Client model and I do not think it is getting ran.
Thanks for your help.
Thank You,
Ben Johnson
E:
2007 Jun 25
1
has_many with :dependent => :nullify
Hi all,
There is something confusing with has_many in the current API :
When deleting a record with association.delete, the corresponding
association''s foreign key is nullified. However, if has_many has
the :dependent option set (to any value), the association''s destroy
method is called instead.
This is awfully inconsistent with the behavior expected when
setting :dependent to
2006 Apr 15
1
Is this a HAS_ONE bug?
Let''s say I have:
A BELONGS_TO B
B HAS_ONE A (with :dependent=>:nullify)
But this association does not need to exist. In other words, I could
have many A''s and B''s that are not associated in this manner.
Presently, if I try to delete "B":
1. If B is associated to an "A", this works fine and A.my_B is
nullified.
2. If B is NOT associated, I
2010 Sep 16
1
[RFC] function to parse string to argc/argv pair
Currently, I'm looking to improve rosh and would like to start using
getopt(). I'd like to parse a string obtained by fgets() to be like
the argc/argv pair created by __parse_argv but in a way that's more
cross-platform (such that it can also be used by .lnx files rather
than just COM32) and suitable to use in rosh and lua.c32.
I've made a function and inlined a test program for
2013 Apr 20
8
xen-unstable: commit commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c leaves HVM guest dangling after shutdown or destroy.
Hi,
Commit 63753b3e0dc56efb1acf94fa46f3fee7bc59281c x86: allow VCPUOP_register_vcpu_info to work again on PVHVM guests
Leaves HVM guests dangling after shutdown or destroy:
xl list gives:
(null) 16 0 4 --p--d 11.5
(null) 17 0 1 --ps-d 12.0
(first was destroyed, second shutdown)
The
2003 Aug 01
1
[Fwd: dvd+rw-format -force problem]
> -------- Original Message --------
> Subject: dvd+rw-format -force problem
> Date: Thu, 31 Jul 2003 21:30:00 +0200
> From: Melvyn Sopacua <freebsd-stable@webteckies.org>
> Organization: WebTeckies.org
> To: stable@freebsd.org
>
> I haven't felt the need to fully blank a DVD+RW for a while untill today.
Formally speaking blanking is not appicable to DVD+RW.
2007 Dec 30
4
:dependent for not destroying
Hi,
Is there a way to use the :dependent option to set a certain attribute
to null rather than destroying the records?
For example, take the following models:
User
id, integer
name, string
group_id, integer
belongs_to :democrats
Groups
id, integer
name, string
has_many :users
If I delete a certain group, is there a way to have the ''group_id''
attribute of all the
2007 Jul 17
5
habtm confusion
Hello friends!
I am trying to make a database that will have a group of people set to
committees, and a person can be in multiple committees, and a committee
obviously has multiple people. The people are senators at my
university. These are my current models:
senator.rb:
--
class Senator < ActiveRecord::Base
validates_presence_of :first_name, :last_name, :floor
has_and_belongs_to_many
2008 Jul 04
2
How do change catalog before catalog is delted?
In my rails application,there are two models:post and catalog.
One post has a catalog,and one catalog has many posts.
When I delete a catalog,the posts belongs to the catalog will not be
shown normal,for it''s catalog is no existed.
Now I want to create(if the ''Defalut catalog'' is not existed) a
''Defalut catalog'' in catalogs table,and make the
2003 Dec 19
5
for loop over dataframe without indices
One can perform a for loop without indices over the columns
of a dataframe like this:
for( v in df ) ... some statements involving v ...
Is there some way to do this for rows other than using indices:
for( i in 1:nrow(df) ) ... some statements involving df[i,] ...
If the dataframe had only numeric entries I could transpose it
and then do it over columns but what about the general case?
2006 Mar 21
4
Realtime SIP Persistency
I've been using realtime for sip users information.
I noticed that when you are doing this, if you do a 'reload' or restart asterisk, the information in a 'sip show peers' goes away. When I do this, MWI stops working. I always though MWI used the astdb file ('database show') to determine where to send MWI but it must be using 'sip show peers' because when this
2016 Mar 27
2
Undefined behaviour in command line parser
In these days I’ve integrated llc code into my compiler.
I had an undefined behaviour because when cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion) is called, the modules I give to the code in input to compile got somehow “corrupted" by this function.
It is definitely an undefined behaviour because every debug I do, modules gets different changes, producing
2017 Aug 16
6
extremely low performance on Samba 4.2.14-Debian
Le Fri, 11 Aug 2017 11:55:03 +0100
Rowland Penny via samba <samba at lists.samba.org> écrivait:
> If you are going to upgrade, you might as well go for the highest
> version you can, this will probably mean using Louis's packages.
>
> Samba is a rapidly changing program, a new minor version is released
> every 6 months (approx) and the changes are significant.
>
>
2011 Apr 06
2
Wish List: has_many :dependent => {}
I am after a nice way to disable (not destroy, delete nor nullify) all
associated records. I''m a hoarder, I don''t want to get rid of anything but I
want to stop records being visible.
I have a disabled boolean in my tables and if I disable the top record in
the association (say the association is 5-6 levels deep), I would like to
cleanly disable its children.
I''ve
2006 Jul 19
0
Clearing dependent collections
I have a user model that owns messages :
class User < ActiveRecord::Base
has_many :messages , :dependent => :nullify
end
I''m using nullify so that when the user is deleted, the messages
continue to exist - they''re just marked as being ownerless.
However, calling user.messages.clear actually deletes all his
messages, which I was a little surprised at. I would
2009 May 12
1
bug in com32/modules/chain.c
Hello,
The main function in com32/modules/chain.c does a lot of argument
parsing, finding the drivename, partition, seg, etc., for two statements
nullifying most of the work:
drivename = argv[1];
partition = argv[2]; /* Possibly null */
Seeing as the function initializes the variables correctly at the
beginning:
drivename = "boot";
partition = NULL;
shouldn't these statements be removed?
This in syslinux-3.81-pre2.
Regards,...
2008 Nov 19
0
has_many through select box in form
Gentlemen,
I have searched the group and have not found any post that clarifies
thsi s=issue to me. Please forgive me in advance if I missed
something.
I have 3 models:
Ticket
has_many :citations, :dependent => :nullify
has_many :violations, :through => :citations
Violation
has_many :citations, :dependent => :nullify
has_many :tickets, :through => :citations
Citation
2017 Aug 16
0
extremely low performance on Samba 4.2.14-Debian
I HATE these auto send keys.. Did i tell that already..
( see below )
> -----Oorspronkelijk bericht-----
> Van: L.P.H. van Belle [mailto:belle at bazuin.nl]
> Verzonden: woensdag 16 augustus 2017 23:22
> Aan: 'samba at lists.samba.org'
> Onderwerp: RE: [Samba] extremely low performance on Samba
> 4.2.14-Debian
>
> Hai Emmanuel,
>
> But ive re-read the
2006 Jul 24
1
[PATCH] vfork() for parisc
Implement "pid_t vfork(void)" for parisc.
Signed-off-by: Kyle McMartin <kyle at parisc-linux.org>
---
Ugh. vfork() me harder.
Kbuild | 2 +-
vfork.S | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/usr/klibc/arch/parisc/Kbuild b/usr/klibc/arch/parisc/Kbuild
index d57a873..57ca5c2 100644
--- a/usr/klibc/arch/parisc/Kbuild