id-generation

Hibernate ID Generator

Anyone know of some good tutorials on how to create a custom ID generator for hibernate? ...

What happens if hibernate_sequences table is accidentally reset?

Hi, I am using hibernate with ID annotations: @Id @Column(name = "ID", nullable = false) @GeneratedValue(strategy = GenerationType.TABLE) For some reason the hibernate_sequences table, which is managed by hibernate, has been reset. ie. Newly inserted entities have IDs (numbers) less than older entities. Is this normal? Won't there be ...

Modify Id generation for a Grails Plugin

I am using a plugin for Grails - the Amazon S3 plugin - and the domain object provided by the plugin doesn't specify the Id Generator. I am using Postgresql and require the id genrator to be identity. I could copy the plugin in my plugins directory and mess with the domain object provided but that doesn't sound like a clean approach.Cou...

How to generate YouTube or tinyurl.com's ID? such as "watch?v=VvBFwH-QCmQ"

Possible Duplicate: YouTube URL algorithm? I know one method it can be done... surprisingly, a friend I know who is quite smart doesn't know how to do it... I wonder if this may be a good interview question too. Interested in other answers. I will post my answer later on. Update: my answer doesn't use a hash at all... ...