Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work well with Grails Audit Log Plugin #18

Open
confile opened this issue Nov 2, 2015 · 1 comment
Open

Does not work well with Grails Audit Log Plugin #18

confile opened this issue Nov 2, 2015 · 1 comment

Comments

@confile
Copy link
Contributor

confile commented Nov 2, 2015

I tried this plugin together with: https://grails.org/plugin/audit-logging

Here is my Class:

@Translatable(with = RoomServiceCategoryTranslation)
class RoomServiceCategory {


  static auditable = [ignore:['version','lastUpdated','createdBy','lastUpdatedBy']]
  static stampable = true

  String id
  Date dateCreated
  Date lastUpdated
  String createdBy


  static constraints = {
    createdBy nullable: true
    lastUpdatedBy nullable: true
  }
 ....
}

When I do:

def myParams = params << [locale: new Locale(params.language)]
 roomServiceCategory.addToTranslations(myParams)
roomServiceCategory.save(flush: true)

I get this:

_mysql_5_6_25__majestella_majestella_room_service_category_translation

The field createdBy is not set by the audit log plugin. I guess this might be due to some AST.

@ujjwol05
Copy link

ujjwol05 commented May 7, 2017

  Date dateCreated
  Date lastUpdated
  String lastUpdatedBy
  String createdBy

  static constraints = {
      lastUpdatedBy nullable: true;
      createdBy nullable: true;
  }

  static auditable = true
  static stampable = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants