Results 1 to 5 of 5

Thread: Custom finder code. How to avoid undo managed

  1. #1
    Join Date
    Jun 2010
    Posts
    440

    Question Custom finder code. How to avoid undo managed

    Hello

    I wonder how I can do the following properly...

    I created a finder, which requires a Converter. I need it customized.
    I tried different things and worked when moved it to its Controller class.

    I continued development and noticed Roo now is not managing anymore anything related to such entity.

    Again how can I keep my customized converter while Roo still happy managing my code?

    Thx

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Are you sure you didn't accidentally delete the @RooEntity annotation on the entity class? I see no reason why your own custom finder should upset Roo's artifact management for the entity.

    Btw I would not write finders in Controllers, but use a Repository.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Jun 2010
    Posts
    440

    Default ...How to avoid unmanaged from previous managed Roo asset

    Hi Rod,

    More clearly: I placed the converter method in the controller to keep my custom changes. Since Roo regenerates all related code when the entity is modified. Originally the method is placed in the correspondent _Roo_Controller.aj. I put it in the controller because the preview refactor>push is placing it.

    After doing such thing, I am able to keep my changes but Roo starting not managing the entity and related code: controller, jpx, etc. I need Roo continue managing it because I am still in development.

    So I am assuming there is correct way of doing such thing.
    I am not changing anything related the Roo annotations


    Thx for all your help

  4. #4
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    So you didn't actually perform push-in refactoring, which would stop Roo round tripping?
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  5. #5
    Join Date
    Jun 2010
    Posts
    440

    Default On Roo undoing managing issue

    Hi Rod,

    That is precisely what I am trying to figuring out....
    Don't worry I worked out the issue. I just continue developing avoiding
    refreshing project using Roo directly; since I am done creating entities

    On my next Roo project -coming very-very soon- I will be able to reproduce it or not. I'll report findings on that experience as well.

    On the the other hand:
    What I can tell you Roo is absolutely FANTASTIC. Java Web Development is fun again!.
    Thx
    jD

Tags for this Thread

Posting Permissions

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