Results 1 to 2 of 2

Thread: Validation in duplicates

  1. #1
    Join Date
    Nov 2004
    Location
    Caracas/Venezuela
    Posts
    4

    Default Validations

    I'm using automatic controller for a simple object. My object has a field "description". When I'm saving a new object I would like to validate that "description" is unique in my db. Where I should do this validation? When I implement it in Object.aj Roo erase it!
    Last edited by paramosyermos; Aug 12th, 2009 at 10:57 AM.

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    @paramosyermos,

    Roo will delete .aj files when changes are necessary. The recommended way is to 'push-in' the method you want to change from the .aj file to the actual java source file. You can do that manually or use STS to do it for you. If you don't change the method signature, you will notice that Roo will not generate the method in the aj file any more and therefore you have full control of your customized method in the normal java sources.

    HTH,

    Stefan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •