Fixtures Error With Rails 2.1 (and 2.0.2)

I have begun to use the reference function feature of sexy migrations, and I have noticed that the fixtures are actually not playing nice with this new feature.

If I create a model, whose table has this line: t.reference :user

the fixure will look like

one:   user:

when it should be user_id, now, it may be possible (I don't know, to define an object in the fixtures now, but when I run my unit tests I get an error trying to populate a 'user' field in my database that does not exist. So, that seems to me like its not being very intelligent.

...or am I missing something?

Just user: is fine, as long as that model as a belongs_to :user

Fred

t.references (not reference)

t.reference is working for me :confused: ie: I am actually getting the proper foreign key created and everything.

I may not have had the belongs_to though, good call.