Question
· Apr 29, 2016

%Library.GlobalCharacterStream deprecated

On the class reference %Library.GlobalCharacterStream is marked as deprecated in favor of  %Stream.GlobalCharacter.

How I can migrate the data from class properties defined as %Library.GlobalCharacterStream to the new one %Stream.GlobalCharacter? 

Does the %Stream.GlobalCharacter have the same SQL support from %Library.GlobalCharacterStream?

Thanks.

Discussion (9)0
Log in or sign up to continue

A quick test suggests that data migration is indeed required after changing the type of a property from %GlobalCharacterStream to %Stream.GlobalCharacter.

  1. Populate a class with some instances, each containing stream data.
  2. The char_length() function in SQL returns the length of the stream field.
  3. Change the type of the property and populate the class with some more instances.
  4. The char_length() function returns the length for the new instances, but null for the old ones.

I imagine the supported way to migrate is to make a new stream field and copy from the old field using CopyFrom(). I'd be tempted to diddle the stream references to point to the existing data. In any case, if it ain't broke ...

I am really interested in to know if just change my class definition from %Library.GlobalCharacterStream to %Stream.GlobalCharacter is needed considering that it has the same storage mechanism or there is some diferences where is needed to migrate data from %Library.GlobalCharacterStream to %Stream.GlobalCharacter by writing on the new %Stream.GlobalCharacter stream?

Also when using SQL to insert,  update and select %Stream.GlobalCharacter has the same behavior as the %Library.GlobalCharacterStream ? 

1) Deprecated for COS means we simply do not want to encourage people to use these APIs anymore. There is no requirement to merge other then hopefully the benefits in the new code that led to the deprecation in the first place.

2) Atelier has the ability to display any deprecated syntax visually and also link to its documentation, which should have some indication of why it was deprecated and what replaced it.

3) Atelier will also have full refactoring capabilities for updating deprecated syntaxes though that will not cover data migration issues as outlined in this particular case.

4) We also intend to have full support for code analysis in Atelier which can be run and show me anywhere I am using deprecated syntax and suggest solutions.