5 comments

Hello Norris,

The next EAP build will include this feature.
It is accessible via "Generate Persistence Mapping/By Database Schema"
item of module context menu.
At least one DataSource must be configured in "Tools/Data Sources".

It imports schema, provides default mapping for "CMP" attributes,
allows to configure "CMR" attributes manually and generates annotated
Java code for the mapping.
Optionally, ORM XML and persistence.xml can be created.

I appreciate feedback on the matter.

Gregory


Norris Shelton wrote:

http://www.jetbrains.net/jira/browse/IDEADEV-5151?page=all

What is the story on this? Sounds like a great idea.

0

Whoohoo!!! That is exactly what I wanted. As soon as JBoss gets their
EJB implementation up to the latest standard, I will give it a spin.

Gregory Shrago (JetBrains) wrote:

Hello Norris,

>

The next EAP build will include this feature.
It is accessible via "Generate Persistence Mapping/By Database Schema"
item of module context menu.
At least one DataSource must be configured in "Tools/Data Sources".

>

It imports schema, provides default mapping for "CMP" attributes,
allows to configure "CMR" attributes manually and generates annotated
Java code for the mapping.
Optionally, ORM XML and persistence.xml can be created.

>

I appreciate feedback on the matter.

>

Gregory

>
>

Norris Shelton wrote:

>> http://www.jetbrains.net/jira/browse/IDEADEV-5151?page=all
>>
>> What is the story on this? Sounds like a great idea.

0

Hello Gregory,

Great idea for tool. Is there any chance this tool grow up to provide parallel database and beans development support? I mean, it would be really helpful to be able to:
1) compare db-schema and exisitng EJBs,
2) see the exact difference at tables/attributes/relations level,
3) be able to synchronize both EJB in project and database,
and so on...
It is much more efforts to implement, but I beleive it would be really much used by many people who are developing for J2EE platform. At least, many of people I'm working with ;).

With kind regards, Pavel

0

Pavel,

Thank you for your ideas. There's always a chance to have more features
from us :)

> 1) compare db-schema and exisitng EJBs,

This doesn't sound to be a rocket-science. We'll take a look at it. As
always - good UI is a problem. Have you seen any good UI for showing
diff between DB structures?

> 3) be able to synchronize both EJB in project and database,

I guess it should be a refactoring on java side? Not just schema
regeneration?

0

Hi Mike,

> 1) compare db-schema and exisitng EJBs,
This doesn't sound to be a rocket-science. We'll take
a look at it. As
always - good UI is a problem. Have you seen any good
UI for showing
diff between DB structures?


No, I've never, unfortunately. In my opinion, it should be a tree, anyway, with either tables and relations. Tables and relations which are not covered by EJB mapping, should be colored somehow. Selection of colored item in good IDEA tradition probably should lead to intention how to cope with it ;).
I expect, it promises to be easy to use and enough powerful in results.

3) be able to synchronize both EJB in project and

database,
I guess it should be a refactoring on java side? Not
just schema
regeneration?


I wish I can get only changes from database, because database is offen created and maintained by other people, so full syncronization (of DB big enough) is painful. This is really a kind of refactoring and for me it would be enough to have intentions like following:
- Add/remove mapping for DB table,
- Add/remove mapping for DB attribute,
- Add/remove CMR mapping for DB relation

And of course, batch "sync-all" refactoring would be useful, too.

Good luck, Pavel

0

Please sign in to leave a comment.