You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but the problem is when I'm facing in when fetching data from data base. I am looking for an AfterGet method to transform the data (similar to PostGet in gorp). Can you suggest any other workaround?
The text was updated successfully, but these errors were encountered:
I need to use diffrent date-time format for database and application. I have following struc for model
type SomeTable struct {
Id int64
SomeString string
sql:"size:255"
SomeDate time.Time
}
I'm converting the the date format before saving by
func (o *SomeTable ) BeforeSave() (err error) {
o.SomeDate = o.SomeDate.Format(SQL_DATE_FORMAT)
return
}
but the problem is when I'm facing in when fetching data from data base. I am looking for an AfterGet method to transform the data (similar to PostGet in gorp). Can you suggest any other workaround?
The text was updated successfully, but these errors were encountered: