On 18 October 2010 20:52, DAZ <[email protected]> wrote: > Hi Jon, > > Thanks for the reply and sorry for taking so long to get back to you. > > It turns out that I was inadvertently using dm-constraints as I was > using require 'data_mapper' > The default value is 'protect' so it was refusing to delete my lists. > I've not changed this to :destroy and it works fine. > > I just have a couple of questions: > 1) Do you have to use dm-constraints when using associations?
You don't have to use it, but it's generally advisable. As well as setting things up in DM land, it also adds database level constraints to make sure you can't have orphaned records (one way or another). This helps to keep your application's data consistent. Think of them as being akin to validations for associations, ensuring your foreign (or child) key always points to a valid record. > 2) Is there any way of getting DM to report the reason why it hasn't > deleted the list in the console so it is easier to figure out why it > isn't doing something in future? Unfortunately not. > > cheers, > > DAZ regards Jon -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
