My app has a model defined like this:
MyModel < ActiveRecord::Base
The Database is DB2.
The view definition looks like this
When I create a new model and try to save it by doing this…
myModel = MyModel.new
myModel.name = “TEST”
Rails is creating an INSERT statement which includes the primary key -
LEGACY_ID - set to an ampty String. This blows up auto-increment on
Anyone seen this? Suggested solution.
Note - if LEGACY_ID is removed from the view it works OK, but I’m
working with requirements that say it should be there.