is there any way to retrieve a derived field on save or update? the reason i need to do this is because I am trying to implement a tagging system, where each tag has an auto-generated ID from the database, but i want the tag itself to be the unique property. for example there is only one tag named 'test' in the system, and it can be referred to by either its name or it's auto-incremented identifier. so i have set it up to have the name be the ID field and the number be a regular field with update=false and insert=false. this works fine to save but when i do, it doesn't update the instance in memory with the generated id- i would like to use this number as the foreign key in tag pivot tables, that is why i want it. any ideas, or anyone who's implemented a tagging system using hibernate?? thanks!
|