I have an existing SQL table the schema of which I cannot modify, and I would like to create a Lithium data model for it. The problem is that one column contains multiple "fields" separated by a special character.
E.g.
data = "username|email|age"
I would need to:
- split the value of the column after the row was read, and create "virtual" attributes
- be able to assign to these virtual attributes
- join the virtual attributes to create a valid column value before save
- create validators for the virtual attributes
- use html->form to create form fields for the virtual attributes
I tried to figure out how to do this, but there seems to be no easy way. Not even a hard way :) Any ideas?