Displaying 20 results from an estimated 105 matches for "nullify".
Did you mean:
nullif
2006 Jun 07
3
#5209 patch: :dependent => :nullify deletes child records
Hi everyone,
A couple of weeks ago I 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'...
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 Joh...
2007 Jun 25
1
has_many with :dependent => :nullify
...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 :nullify.
While browsing the Trac database, I found several patches submitted to
address this issue :
http://dev.rubyonrails.org/ticket/5209 (1 year old !)
http://dev.rubyonrails.org/ticket/7309
These patches look good to me, but still haven''t been applied. Is
there any good reason for this ?
If n...
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...
2010 Sep 16
1
[RFC] function to parse string to argc/argv pair
...const char *istr)
{
int argc = 0;
const char *p;
char *q, *r, *args, **arg;
int sp = 1; //, qt = 0; /* Was a space; inside a quote */
/* Scan 1: Length */
/* I could eliminate this if I knew a max length, like strncpy() */
int len = strlen(istr);
/* Scan 2: Copy, nullify and make argc */
if (!(args = malloc(len + 1)))
goto fail_args;
q = args;
for (p = istr;; p++) {
if (*p <= ' ') {
if (!sp) {
sp = 1;
*q++ = '\0';
}
} else {
if (sp) {
argc++;
sp = 0;
}
*q++ = *p;
}
if (!*p)
break;
}...
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]
...l today.
Formally speaking blanking is not appicable to DVD+RW. dvd+rw-format
-force merely zeros bitmap which describes which ECC blocks were
de-iced/written to and nullifies few blocks in the beginning of the
media. It's not what one would normally consider as [full] blanking. If
you want to nullify the media, e.g. for privacy reasons, 'dvd+rw-format
-force /dev/cd0c' won't do the tick, 'growisofs -Z /dev/cd0c=/dev/zero'
would.
> The problem is the following:
> When issuing:
> dvd+rw-format -force /dev/cd0c
>
> it fails, with 'unable to unmount' err...
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
...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 :committees#, :dependent => :nullify
#has_many :chairs, :class_name => "Committee"#, :dependent => :nullify
end
--
The last has_many is commented out so that I can at least get this
working, and then I''ll add that in later. Also note that the :dependent
has been commented out. Is this deprecated or no lon...
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 disabl...
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 have expected
it to just se...
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.
Regar...
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
belongs_to :ticket
belongs_to :violation
I am creating the edit a new views for the ticket and would like to be
able to relate...
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