[jbosstools-dev] Re: JBDS Hibernate - plans & priorities

Denis Golovin dgolovin at exadel.com
Wed Apr 16 02:18:02 EDT 2008


That's a good use case :)

I'd make it available for multi-selection, so it would let map not only 
related classes.
It means we wold have not only reverse but also forward engineering.

Denis

Max Rydahl Andersen wrote:
>> Let's imagine I have several (say 10) classes that I'd like to make
>> persistent. The classes form completed domain model.
>> I decided to use hibernate and JPA annotations, I have lets say JBDS
>> 1.1.0 or JBossTools 2.1.0 installed.
>>
>> Question is what I should do to make my model persistent? It there
>> anything that helps me to do it?
>>     
>
> Not that I'm aware, the thing that get closest is maybe Dali JPA which has
> as JPA View where you can click to make something an entity.
>
> I'm not sure it does anything else than add @Entity to the class.
>
>   
>> Now I see only way. I have to go through all classes and add annotations
>> for class and for fields.
>>     
>
> Having a "Make this class and its related classes mapped via JPA" would be 
> an interesting Refactoring to implement.
>
> Should basically just work like this:
>
> makePersistent(ITypeRoot clazz, Set processed) {
>   add @Entity 
>   Find most likely id property and add @Id  
>
>  processed.add(selectedClass);
>  associations = getAssociatedClasses(selectedClass);
>
>  foreach class in associations {
>   if(!processed.contains(class)) {
>        makePersistent(class, processed);     
>   }  
> }
> }
>
> There then might be some exceptional cases like handling version properties, temporal values and
> non-JPA supported mappings which Hibernate would be able to understand/map.
>
> /max
>
>   
>> Did I miss something?
>>
>> Thanks
>>
>> Denis
>>
>> Max Rydahl Andersen wrote:
>>     
>>>> Could you define priority direction?
>>>>
>>>>         
>>> Fix the ones that are open for 2.1 - then we can talk future. That is what is important now.
>>>
>>> We are doing waaay to many half-solutions in the hibernate console code at the moment. Let's
>>> complete what we are working on instead of spawning of too many concurrent working directions.
>>>
>>> For the rest:
>>>
>>>
>>>       
>>>> JBIDE-2008 in progress for Dima Geraskov
>>>>
>>>>         
>>> What is the status ?
>>>
>>>
>>>       
>>>> JBIDE-1178 in progress for Dima Geraskov
>>>>
>>>>         
>>> It still has alot of bugs and thus too fragile to include in 2.1 at the current point.
>>>
>>>
>>>       
>>>> JBIDE-1921 Hibernate Tools User Guide - Fix Version/s: 2.2.x
>>>>
>>>>         
>>> Thus not for 2.1
>>>
>>>
>>>       
>>>> JBIDE-1431 Generate Entities of non Empty Tables creates weird UIs - Fix
>>>> Version/s: 2.2.x
>>>>
>>>>         
>>> Yes, for 2.2.x
>>>
>>>
>>>       
>>>> JBIDE-1708 Restore Defaults button does nothing in Properties for Hibernate
>>>> Settings - Fix Version/s: 2.2.x
>>>>
>>>>         
>>>       
>>>> -          Just admit can we start some of it?
>>>>
>>>>         
>>> I don't know what that means.
>>>
>>> JBIDE-1708 is done.
>>>
>>>
>>>       
>>>> JBIDE-1610 hibernate reverse engineering - Table & Columns tab -
>>>> delete/remove button - Fix Version/s: LATER
>>>>
>>>> -          This issue should be simple and seems to be rather important to
>>>> be in 2.1.
>>>>
>>>>         
>>> Then suggest a fix for it.
>>>
>>>
>>>       
>>>> JBIDE-1841 Improve error message when performing SchemaExport and an
>>>> exception occurs (e.g. SQL exception) - Fix Version/s: LATER
>>>>
>>>> -          improve the handling of the error - also seems simple and could
>>>> be in 2.1
>>>>
>>>>         
>>> If you think it is simple then please suggest a way to do it. Remember schemaexport is not the only one
>>> throwing errors.
>>>
>>>
>>>       
>>>> JBIDE-1913 Hibernate Code Generation - properties setup special editors -
>>>> Fix Version/s: LATER
>>>>
>>>> -          what about this?
>>>>
>>>>         
>>> Yes ? Feel free.
>>>
>>>
>>>       
>>>> JBIDE-1974 Exception occurs after add additional mapping file into Hibernate
>>>> configuration that is already listed in cfg.file. - Fix Version/s: LATER
>>>>
>>>> -          what about this?
>>>>
>>>>         
>>> Yes ? Feel free to suggest a patch.
>>>
>>>
>>>       
>>>> JBIDE-1767 & JBIDE-1768 - I can proceed with it but it seems I need your
>>>> consulting here.
>>>>
>>>>         
>>> Yes, so it will have to wait.
>>>
>>>
>>>       
>>>> Could you suggest (required to do) opened suitable issues for 2.1?
>>>>
>>>>         
>>> There is already more than enough issues open for hibernate for 2.1 that is still
>>> in progress and not fixed.
>>>
>>>
>>>       
>>>> What do you think about model creation for JBDS Hibernate - maybe it is a
>>>> time to start it? But this is not 2.1 issue.
>>>>
>>>>         
>>> As suggested before: come up with a way of doing it then we look at it.
>>>
>>>
>>>       
>>>> opensource.atlassian.com - there are a lot of issues which seems to be
>>>> useful - I can dig into and propose several todo. for example
>>>>
>>>> -          HBX-464 - add cfg.xml editor (seems the same - HBX-10  Properties
>>>> page )
>>>>
>>>>         
>>>       
>>>> -          HBX-46  allow query results to be shown lazy
>>>>
>>>> -          HBX-895 Content assist doesn't work when an entity alias is not
>>>> preceded by whitespace
>>>>
>>>> -          Etc. - there are a lot of propositions here - so
>>>>
>>>>
>>>>
>>>>
>>>>         
>>> /max
>>> _______________________________________________
>>> jbosstools-dev mailing list
>>> jbosstools-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>>>
>>>       
>>     
>
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20080415/bf47017d/attachment.html 


More information about the jbosstools-dev mailing list