• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Sequence,How to Create a idenfifier YYMMDD-abc-secuence number of a day.

 
Moli molina
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create a complex identifier.

It's for a document register. The table of document has to be identified this id:
for example:
YYMMDD-abc-secuence number of insert a day.
100102-doc-000000001
100102-doc-000000002
100102-doc-000000003
...
100102-doc-000000043
...
100103-doc-000000001
100103-doc-000000002
...

I don't need Idea how to do these kind of idenfier.
I tried to implement this example, but doen't work. http://blog.anorakgirl.co.uk/?p=43

I use hibernate annotations, with struts2+spring.

Suggestions?

Many thanks!




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic