[Seaside] OmniBase question ref. model chnages

Roger Whitney whitney at cs.sdsu.edu
Fri Aug 26 20:35:17 CEST 2005

     When you add instance variables to a class add them at the end  
of the list of instance variables as OmniBase uses the position of  
the instance variables. This works fine when there is no inheritance.  
I have not found a good way to deal with inheritance. One can write  
code to read in all objects of the class, shift the variables back to  
where they belong and save them. If Student had 9 instance variables   
before adding lastLoggedIn and lasLoggedIn was the 6'th instance  
variable then something like:

     9 to: 6 by: -1 do: [:each | object instVarAt: each +1 put:  
(object instVarAt: each)]

should do the shift.

On Aug 25, 2005, at 4:47 AM, Dmitry Dorofeev wrote:

> Hi all,
> I have an OnniBase with some objects of class User and class  
> Student stored.
> Student is inherited from User.
> I hacked a class User and added instance variable lastLoggedIn and  
> accessors.
> Now objects of class Student taken from OmniBase are messed up,  
> i.e. values
> of instance variables get wrong. Seems they are just get shifted.
> Is there a safe way to change model for objects in the OmniBase  
> database?
> Online docs are not so expressive :-(
> Thanks,
> -Dmitry.
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside

Roger Whitney              Department of Computer Science
whitney at cs.sdsu.edu        San Diego State University
http://www.eli.sdsu.edu/   San Diego, CA 92182-7720
(619) 583-1978
(619) 594-3535 (office)
(619) 594-6746 (fax)

More information about the Seaside mailing list