Results 1 to 2 of 2

Thread: Transient field

  1. #1

    Default Transient field

    Hi all,
    I think I am failing to understand why the command:
    entity --class ~.Document --testAutomatically
    field string --fieldName name --notNull
    field string --fieldName content --notNull
    field string --fieldName status --transient


    will create
    private transient String status;
    in my Document.java class:

    but not getters and setters in aj files.

    Is this expected behaviour?
    Is there any other way to make my transient field accessible from other class except manually adding getters and setters in Document.java?

    Thanks,
    milan

  2. #2
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Default

    An Entity created with Roo will automatically add the @RooJavaBean annotation which is responsible for telling Roo whether or not to generate getter/setter methods for each non-transient field only.

    You can look at the JavaDoc for more, it says the same thing.

    http://static.springsource.org/sprin...oJavaBean.html

Posting Permissions

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