Fixtures Plugin

Nulls appear in hasMany list on beans created using build-test-data

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 1.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    grails 1.3.4, fixtures 1.0.1, build-test-data 1.1.1
  • Testcase included:
    yes

Description

See sample app attached. Basically when I add fixture beans to a hasMany list by setting the backref I get a null at every other index. i.e. the list is 2x expected size and every even-numbered index contains null. This only happens if the fixture is using a build block. Also, setting the list on the one end using ref("foo") seems to work fine.

Activity

Hide
Luke Daley added a comment -

This is a bit curious. I don't have much experience using Lists with GORM so I may not be doing things correctly. I suspect though this is going to need to be solved in BTD.

Show
Luke Daley added a comment - This is a bit curious. I don't have much experience using Lists with GORM so I may not be doing things correctly. I suspect though this is going to need to be solved in BTD.
Hide
Luke Daley added a comment -

If you get a chance, can you verify that the same thing doesn't happen if doing this by hand with BTD.

Show
Luke Daley added a comment - If you get a chance, can you verify that the same thing doesn't happen if doing this by hand with BTD.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: