Hi,

I am using JRuby with Sinatra and ActiveRecord as ORM. I have code such as
this:

     ActiveRecord::Base.transaction do
        product.rollback_active_record_state! do
          if(product.save(false))
            logger.debug "Prod ID: #{product.id}"
            yield if block_given?
          end
        end
      end


When I execute rackup with MRI 1.8.7p 357, it prints valid Prod ID. However
when I deploy the same using jruby-rack/warbler, It always prints 1 as
product id, however save is successful and persisted correctly in the DB.
Its just that I get invalid product id, which is always 1. Anyone knows
what might be going on here?

vivek.

Reply via email to