Results 1 to 4 of 4

Thread: CRUD references nullable

  1. #1
    Join Date
    Dec 2009
    Posts
    2

    Default CRUD references nullable

    When using the crud functionally if you have an object that references to an other object like so:

    @ManyToOne(optional=true)
    private Activity duplicateOf;

    There seems to be no way to select a null value.

    Adding the following inside the form tags solves the issue:

    <form&#58;option value="" />

    Just making sure I'm not missing something or if I'm doing something wrong, is there some way to go about this so Roo does this automatically?
    Last edited by michael-b; Dec 10th, 2009 at 07:13 PM. Reason: needed to escape :

  2. #2
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Thumbs up Logged.

    Hi Michael,

    Sorry for not seeing your thread earlier. I too ran into this and have logged it as ROO-581. Maybe you could go there and vote for it?
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  3. #3
    Join Date
    Dec 2009
    Posts
    2

    Smile

    I've Voted.

  4. #4
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Post

    I've added a comment to ROO-581 explaining an easier workaround than my original one: allowing id-based finders to accept null ids.

    I've logged ROO-623 to make that behaviour the default; being a more minor change, it has a chance of sneaking in before the 1.1 release for which ROO-581 is milestoned...
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

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
  •