Effect CommunityEC
Effect Community2y ago
7 replies
bsluther

Renaming Fields in Class Schema Without Converting to Struct

Is there any way to rename a field on a class schema without turning it into a struct? Problem with turning it into a struct is that I lose the methods defined on the class. What I'm trying to accomplish is: have a class schema representing a database table with some methods on it. Then extend that class schema to make another schema, representing a join with another table, and keep the methods from the inherited table.
All that works fine except I need to rename some fields which clash between the two tables. Rename "statically", I don't need to transform the data, it will already be renamed when I get it (eg the data will be renamed in the join operation, not by the schema).
Was this page helpful?