Also, you will retreive an immutable resource if you define a Model without a key.
To check for this (and to initialize relationships), you should always run DataMapper.finalize after defining all your models. Regards Jon On 10 January 2011 15:23, Zhi-Qiang Lei <[email protected]> wrote: > Dear All, > > Could anyone answer me when a resource should be immutable? And why? Thanks. > > Best regards, > Zhi-Qiang Lei > [email protected] > > -- > 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. > > -- 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.
