Re: hibernate service bis

Aleksandar Vidakovic <[email protected]> Tue, 05 Jul 2005 22:14:27 +0200
Newsgroups gmane.comp.java.keel.devel
Message-ID <1120594467.6249.18.camel@popper>
Salut Pierre,

actually, there is no hibernate mapping file. Instead, the keel persist
configuration is "translated" into a hibernate mapping (you might look
at
http://cvs.sourceforge.net/viewcvs.py/keel/svc-persist-hibernate/src/java/org/keel/services/persist/hibernate/HibernatePersistentFactory.java?rev=1.43&view=auto ; watch especially the inner class "HibernateConfigurationFactory"). If you want to use hibernate specific features then the idea is to do it somewhat like this:

[code]

   /**
    * Returns the priKey.
    *   
    * @persist.field 
    *   name="prikey" 
    *   type="long" 
    *   primary-key="true"
    *   null-allowed="false"
    *   
    *   parameter-name1="hibernate.generator.class"
    *   parameter-value1="uuid"
    *   parameter-name2="hibernate.???"
    *   parameter-value2="???"
    *   
    *   etc.
    *   
    * @return String
    */
   public Long getPriKey() 
   {
       return priKey;
   }


[/code]

The parameter names correspond to the hibernate xdoclet tags.

BUT: I was a bit busy lately, so I couldn't really finish this all.
There are still some exceptions in the unit tests and the persist
xdoclet module has to be modified for this idea.

I hope to be able to continue soon, because I need this for a project,
too. Sorry for the delay.

Cheers,

Aleks

On Tue, 2005-07-05 at 20:00 +0200, Raoul Pierre wrote:
> Hello,
> 
> Is it possible to nested Hibernate xDoclet tags (@hibernate.xxx) with 
> keel tags in entity class? I just tried, and was unable to find any 
> generated config files related with such tags.
> 
> Is there anything more to do than to put dependencies in project.xml 
> with svc-persist-hibernate and hibernate itself?
> 
> Pierre
> 
> 
> http://keelframework.org/documentation.shtml
> Keelgroup mailing list
> [email protected]
> http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
> 
-- 
Aleksandar Vidakovic <[email protected]>

http://keelframework.org/documentation.shtml
Keelgroup mailing list
[email protected]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com