# File lib/familia/object.rb, line 519 def shortid len = 6 loop do begin self.class.expand(@id.shorten(len)) break rescue Familia::NonUniqueKey len += 1 end end @id.shorten(len) end