Forums / Setup & design / modifiing custom classes

modifiing custom classes

Author Message

Albert Berenguer

Monday 19 May 2003 10:09:47 am

Hi!
I am going to create a new class which will have a large amount of instances. I wanted to know what will happen if I modified the class structure (attributes,etc) when some content of this class exists.
New attributes will be blank in existing objects?
Attributes eliminated are erased from the database?
What happens if the datatype of an attribute is changed?

Thanks for all the help you provide

Berto

Albert Berenguer

Monday 19 May 2003 10:25:41 am

I wanted to know sthg else about this: if a default value is set for a new attribute, or for a previously existing attribute, will the existing objects (the ones set before theese changes) have theese default values too?

Thanks again

Berto

Jo Henrik Endrerud

Tuesday 20 May 2003 10:18:18 am

The existing objects will only be changed when you publish them again (ie edit them and click "send for publishing")
Untill you do this, they will still have the same set of attributes with the same values as they had before you changed the class

Jo Henrik Endrerud | System Developer @ Seeds Consulting | http://www.seeds.no

Paul Borgermans

Tuesday 20 May 2003 2:07:30 pm

For a few cases, this non-updating can be pretty frustrating. For example with the enum attribute: when you change the possible values there, you need to go through every object and republish it.

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans