> Since I seem to be spending *so* much time with problems relating
> to saveOrUpdate() functionality, I decided to provide some new
> functionality.
>
> The Hibernate2 interceptor interface now has a
>
> Boolean isUnsaved(Object)
>
> method, so that the application can use something completely
> different to unsaved-value, if it wants.
>
>
> comments?

APPLAUSE! <klap> <klap> <klap> :)

I like it :), but how about an complementray functionallity
that allows one to use any property to mark the object as unsaved ?
(unsaved is not use for dirty checks, right ?)

Why would I want this ? I want it because then this critical information is
possible to state in the metadata file and not
in some externally semi-related object as the interceptor. (I still like the
idea about being able to have the Interceptor have a say on the
matter...maybe have an isUnsaved(Object, objectsOwnAnswer)  which the
interceptor could thus "veto"?!?)

I imagine this stuff to be similar to to <version> tag, so

<class name="Person">
  <id ...
  <unsaved-property name="unsaved"/>
..
</class>

Which would let the object provide an isUnsaved() method - (which might or
might not be an persistent property)
Thus this should be allowed:


<class name="Person">
  <id ...
  <unsaved-property name="unsaved"/>
..
  <property name="unsaved" type="boolean"/>
</class>

(and maybe similar for using it as an id, but here one should maybe just use
the current unsaved semantics..?)

/max









-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to