[
https://jira.jboss.org/jira/browse/JBIDE-2077?page=com.atlassian.jira.plu...
]
Vitali Yemialyanchyk commented on JBIDE-2077:
---------------------------------------------
>
#5 if I have a public Product(String name) constructor a
default protected constructor is not created - that should happen should it not ?
>
as I understood in this case we should add Serializable
interface - for example
from this ->
org.hibernate.eclipse.jdt.ui.test\res\project\test\annotated\Staff.java
we should get this ->
org.hibernate.eclipse.jdt.ui.test\res\specimen\test\annotated\Staff.java
>
#5 stop doing "reverse if" comparisons, #6, #7,
#8, #9, #11
>
ok, I am tying to avoid this - 5 - this is just
automatically
9 - 1&2 are necessary here - I'll change number constants to flags with reasonable
names
>
9 - Do we really have to keep track of all those imports
this way?
>
seems this is a most robust way
>
#10
>
seems -
org.hibernate.eclipse.jdt.ui.test\res\project\lib\ejb3-persistence.jar - this is file out
of the patch
"the tests fail with differences" - strange, I have got correct result -
I'll try to apply it on other computer to check results...
> "Make this class and its related classes mapped via JPA"
> --------------------------------------------------------
>
> Key: JBIDE-2077
> URL:
https://jira.jboss.org/jira/browse/JBIDE-2077
> Project: Tools (JBoss Tools)
> Issue Type: Feature Request
> Components: Hibernate
> Reporter: Vitali Yemialyanchyk
> Assignee: Vitali Yemialyanchyk
> Priority: Minor
> Fix For: 3.0.0.beta1
>
> Attachments: JBIDE-2077_20080924.zip
>
>
> Denis Golovin:
> >
>
> 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?
> Now I see only way. I have to go through all classes and add annotations
> for class and for fields.
> >
>
> Max Andersen:
> >
>
> 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.
> >
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira