-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Converting column names to property names.
PostPosted: Mon Jun 25, 2007 8:49 pm 
Newbie

Joined: Wed Jan 24, 2007 12:48 pm
Posts: 5
Hibernate version: Hibernate Core 3.2.2.ga Annotations 3.3.0.ga Validator 3.3.0.ga

Hi all,

I want to make automatic validations of unique constraints of our Entitie's tables.

I define the table of the entity like this:
Code:
@Table(name = "rutas", uniqueConstraints = { @UniqueConstraint(columnNames = {
        "numero", "planta_id" }) })


And I want to use the information given in the @UniceConstraint to validate before saving the entity if the constraint would be violated. My validator class
has access to columns forming a unique constraint via the annotation, but I need to translate such columns to property names in order to do my query. Is there any easy/standard way to do such check?

Thanks in advance

Miguel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.