ruby - Is validation possible in Mongo DB on a batch insert? -
I am using a batch insert on a table where there is an array of batch hashes:
@state = State.new @ state.collection.insert batch Is I bypassing Activerecord by doing this like this? When I try to verify a record, nothing happens.
validates_format_of: population, with = with> / \ D + / I am trying to also callback for data formatting.
before_validation: gener_population nothing happens.
My guess is yes in the Grails driver when you use the archive, so it happens. When you do this except for the normal GORM. It seems like there will be one thing in the train.
A work will be repeated around the batch and a valid function present in the train will be present. In grails you want: new state (this). Valid (); This possibility in Ruby is something like the batch state New (this). Valid}
So the question is, if someone is not valid then what should you do?
Comments
Post a Comment