Is there a way to map a legacy column to a different name with ActiveJDBC? My use case involves a legacy database - I have date_created and last_updated which I'd like to be used as the created_at and updated_at columns so they get auto populated, but I'm not seeing a way to do this in the documentation. I think it'd be rather handy to have an annotation based way to map all columns (especially for those of us who like to use camelCase on the web side and underscores in our column names).
The names of these columns are kind of hard-coded in ActiveJDBC. There are a couple of solutions though:
If you chose the #2, you can manage these in the beforeSave()
method by setting your attributes date_created
and last_updated
UPDATE: If you chose #2, be sure to overview ActiveJDBC Inheritance.