Re: [Hibernate] Better validate on property and value ?

2003-12-31 Thread Emmanuel




Les Hazlewood wrote:

  
  
  RE: [Hibernate] Better validate on property and value ?
  Whats wrong with doing:
  
  public boolean isValid(Mapping mapping) {
  
      try {
  
      validate(mapping);
  
      } catch (MappingException me) {
  
      return false;
  
      }
  
      return true;
  
  }
  

And give accurate info using log interface ?




Re: [Hibernate] Better validate on property and value ?

2003-12-31 Thread Max Rydahl Andersen
Emmanuel wrote:

Les Hazlewood wrote:

Whats wrong with doing:

public boolean isValid(Mapping mapping) {

try {
validate(mapping);
} catch (MappingException me) {
return false;
}
return true;
}
And give accurate info using log interface ?
No - isValid() should just return true and false as it does today ;)
validate(Mapping) whichi does NOT exist today - should throw the precise 
exception.
My question was more concerned on wether someone could find anything 
against having
the validate() close to the actual object being validating and have it 
throw an exception instead
of the way it works today.and since noone objected to that i'll just 
make that change and see
what happens ;)

/max

---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Selective SchemaExport

2003-12-31 Thread Gavin King
Not really. I suppose it should be easy enough to patch Hibernate to
allow this.
Les Stroud wrote:

I have some tables in my hibernate mapping that I am in not control of.  
However, I like being able to automatically create and change (drop and 
recreate) my tables. It saves a ton of time.  With the tables that I am 
not in control of (and have mappings to) I have run into a problem.  In 
order for the mappings to compile appropriately (they are foreign keyed) 
I have to have the mappings for the tables that I am not in control on 
in the argument list for the schemaexport tool.  However, I don’t want 
those particular tables generated.  Is there a way to tell the 
schemaexport tool about those mappings but to tell it not to generate 
the ddl for particular mappings?

 

LES

--
Gavin King
JBoss Group
+61 410534454
http://hibernate.org


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel