Re: [hibernate-dev] mutable versus immutable natural keys

2011-12-07 Thread Elias Ross
On Wed, Dec 7, 2011 at 6:08 PM, Steve Ebersole wrote: > But in either case we have a > violation of the immutability. One of the use cases way back when I tried using Natural Keys was for accessing user accounts indexed by phone number. So 90% of our data access pattern was just mapping a phone

Re: [hibernate-dev] [Bean Validation] @Max / @Min as double instead of long

2009-03-05 Thread Elias Ross
On Wed, Mar 4, 2009 at 4:20 PM, Emmanuel Bernard wrote: > I mean we could but we would need to rely on the string representation > > @interface Max { >  String value() > } > > @Max("12.5") > double someNumber; There's very few domains where you want to be validating user input and storing it as

Re: [hibernate-dev] [Bean Validation] @Max / @Min as double instead of long

2009-03-04 Thread Elias Ross
On Wed, Mar 4, 2009 at 3:49 PM, Emmanuel Bernard wrote: > [Follow up with Sebastian] > > Well good point and frankly I do not know :) > 1. do we support float and double for @Min / @Max? > 2. if 1 is yes, I'd be inclined to say the value should be double but that's > not fully automatic. How woul

Re: [hibernate-dev] [Bean Validation] Constraints plural

2009-02-21 Thread Elias Ross
List or Array or Many makes more sense than "Plural" which is really defined to mean "more than one" but I think in some cases you might just have a single element or none at all. For example, this would be valid I think: @Max.Array( { @Max(30, groups=JoeSixPack.class), } ) although I don't kno

Re: [hibernate-dev] exposing statistics easier (HHH-3593 solution)

2008-11-20 Thread Elias Ross
On Thu, Nov 20, 2008 at 5:00 PM, John Mazzitelli <[EMAIL PROTECTED]> wrote: > You assume the hibernate app is always running in a container that supports > that. > > But, by definition, Hibernate is not required to be running in any kind of > container environment - it is designed to be able to run

Re: [hibernate-dev] exposing statistics easier (HHH-3593 solution)

2008-11-20 Thread Elias Ross
Spring and a lot of other containers like JBoss's Microcontainer make it pretty easy to deploy the statistics MBean. E.g. in Spring:

Re: [hibernate-dev] Envers in Hibernate

2008-10-24 Thread Elias Ross
On Fri, Oct 24, 2008 at 5:00 PM, Emmanuel Bernard <[EMAIL PROTECTED]> wrote: > @StoreHistory > @KeepHistory > > I probably like @Audited better though. @Historized sounds computer science-y and pretty cool. @Chronicled is also pretty cool sounding. "Audit" is right out. It means: "1 a: a formal e

Re: [hibernate-dev] Envers in Hibernate

2008-10-22 Thread Elias Ross
I can see the confusion. Hibernate has a similar annotation for optimistic locking which nearly matches "Versioned" in Envers. Some "Version"-free class naming ideas: RevisionListener VersionsReader -> RevisionReader | HistoryReader Classes DefaultRevisionEntity VersionsReaderFactory -> RevisionR

Re: [hibernate-dev] Mutable natural key caching?

2008-09-22 Thread Elias Ross
On Mon, Sep 22, 2008 at 3:10 AM, Sanne Grinovero <[EMAIL PROTECTED]> wrote: > I really dislike the idea of having a mutable key, > am I too extreme? isn't this going to bring you loads of problems? > IMHO if it's mutable it is not a key, but of course I don't see the big > picture: > I'm just curi

Re: [hibernate-dev] Mutable natural key caching?

2008-09-17 Thread Elias Ross
On Wed, Sep 17, 2008 at 9:12 PM, Steve Ebersole <[EMAIL PROTECTED]> wrote: > http://opensource.atlassian.com/projects/hibernate/browse/HHH-2879 ??? > If you use Hibernate EntityManager, get the Hibernate Session and use Criteria to query by natural ID and the entity was deleted, you end up with an

[hibernate-dev] Mutable natural key caching?

2008-09-16 Thread Elias Ross
I've been looking to optimize the caching of an application which uses a mutable natural key, an account phone number. Hibernate does not yet support optimized caching of @NaturalId(mutable=false), because of how the current natural ID relies on immutable IDs. The caching associates a QueryKey ->