[jboss-user] [JBoss Seam] - Re: Domain model duplicates validation

2007-05-28 Thread fernando_jmt
Hi. anonymous wrote : | But in some weird case where my validation require some kind of twisted logic using some properties from the Person entity and all the other entities already persisted, is there a clean way to add this logic in the model? Or this is conceptually wrong? | For me,

[jboss-user] [JBoss Seam] - Re: Domain model duplicates validation

2007-05-28 Thread goku2
Thanks 4 the reply Fer! This works great. anonymous wrote : | I don't know what exactly you mean with "without mapping that to the database" | Sorry about that. I want to validate this uniqueness in my models. But is also great to have then validated in the database to. But in some weird

[jboss-user] [JBoss Seam] - Re: Domain model duplicates validation

2007-05-26 Thread fernando_jmt
I don't know what exactly you mean with "without mapping that to the database", but anyway I have solved something similar as follows: | @Entity | @Table(name = "person", uniqueConstraints = @UniqueConstraint(columnNames = {"firstname", "lastname"})) | public class Person { | @Id