• 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!




 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!