[hibernate-dev] org.hibernate.persister.spi.PersisterFactory and 5.0

2014-11-26 Thread Steve Ebersole
Part of the goals for ORM 5.0 is moving from Configuration to the ServiceRegistry+Metadata for building a SessionFactory. One of the points I ran into that will have to change is org.hibernate.persister.spi.PersisterFactory. The problems is that PersisterFactory accepts a Configuration as part of

Re: [hibernate-dev] [OGM] storing the column names in the entity keys for K/V stores

2014-11-26 Thread Emmanuel Bernard
> On 26 Nov 2014, at 15:21, Gunnar Morling wrote: > > -11-26 12:42 GMT+01:00 Sanne Grinovero >: > It looks like you're aiming at a "pure" mapping into primitives for > the datagrid. > > So it looks very beautiful and tempting to go for a model such as > > cache.put

Re: [hibernate-dev] [OGM] storing the column names in the entity keys for K/V stores

2014-11-26 Thread Emmanuel Bernard
> 2. use an array of property values `cache.put( new Object[] {"Emmanuel", > "Bernard"}, mapRepresentingUser );` > > Will that work at all? Does ISPN really work with value equality for > array-typed keys? > > In a normal hash map you wouldn't get the value back as new Object[] > {"Emmanuel",

Re: [hibernate-dev] [OGM] storing the column names in the entity keys for K/V stores

2014-11-26 Thread Emmanuel Bernard
> On 26 Nov 2014, at 12:42, Sanne Grinovero wrote: > > ORDERED_ARRAY_STRATEGY could be an Enum, and give you some flexibility > among your proposals. With the current model I'd stick to the Map as > they are the only one safe enough, I don’t know what you mean by ordered array strategy and enu

Re: [hibernate-dev] [OGM] storing the column names in the entity keys for K/V stores

2014-11-26 Thread Sanne Grinovero
On 26 November 2014 at 10:19, Gunnar Morling wrote: > 2014-11-25 14:30 GMT+01:00 Emmanuel Bernard : > >> Hi, >> >> With OGM-452 behind us which brings one cache per “table”, we now have >> another decision in front of us. >> >> Should we use a synthetic key for the cache key (say a >> PersistentEn

Re: [hibernate-dev] [OGM] storing the column names in the entity keys for K/V stores

2014-11-26 Thread Gunnar Morling
2014-11-26 12:42 GMT+01:00 Sanne Grinovero : > It looks like you're aiming at a "pure" mapping into primitives for > the datagrid. > > So it looks very beautiful and tempting to go for a model such as > > cache.put( "identifier name", ...) > but it seems quite dangerous to me for the same reason

Re: [hibernate-dev] [OGM] storing the column names in the entity keys for K/V stores

2014-11-26 Thread Sanne Grinovero
It looks like you're aiming at a "pure" mapping into primitives for the datagrid. So it looks very beautiful and tempting to go for a model such as > cache.put( "identifier name", ...) but it seems quite dangerous to me for the same reason that you store (conceptually): {"firstname", "lastname"

Re: [hibernate-dev] [OGM] storing the column names in the entity keys for K/V stores

2014-11-26 Thread Gunnar Morling
2014-11-25 14:30 GMT+01:00 Emmanuel Bernard : > Hi, > > With OGM-452 behind us which brings one cache per “table”, we now have > another decision in front of us. > > Should we use a synthetic key for the cache key (say a > PersistentEntityKey class containing the array of column names and the > ar