"bdlink" wrote : I guess what I would find useful (after trying 
generate-entries on an earlier test project) would be something that either 
maps entities to tables, or generates tables from entities, but since in either 
case, the mapping probably needs some ability for human guidance.

Yes - we never claimed anything else ;)

anonymous wrote : For example, given a schema, a tool can not guess whether I 
want to navigate both directions, may not be able to guess if a relation is 1-1 
or 1-n (at least generate entities turned my 1-1 relationships to 1-n, even 
though I had put unique constraints on the table to force only one 
interpretation).

Hibernate Tools by default generates a one-to-many and a many-to-one per 
foreign key.

All this is controllable by a reveng.xml and/or a custom programmatic reverse 
engineering strategy - read up on that in Hibernate Tools documentation (see 
http://tools.hibernate.org)

anonymous wrote : 
  |   Another example which could not be guessed from the schema is if I want 
the entities to be in an inheritance relationship.

Yes - and I don't believe it should. If you start doing inheritance and more 
complex mappings you are basically going to write what corresponds the mapping 
files/annotations and then reverse engineering is not really usefull.

anonymous wrote : 
  | My main issue with generate entities is not that it guesses wrong, but that 
after hand-fixing the entities, the other artifacts need massive editing, and 
it is hard to be sure I have found everything.  If I restart the project (to 
perhaps use a new version of the tools or seam) I have to go through the entire 
process again.
  | 

so just use Hibernate Tools codegeneration to just generate one set of the 
artifacts; e.g. the entities.  Seam Generate Entitites is just a wizard that 
configures a Hibernate Tools codegeneration launch to generate a full app. You 
can tweak that codegeneration launch as much as you like. Goto Run > Hibernate 
Code Generation > Open Hibernate Code generation dialog (or use the toolbar 
shortcut) to get access to the "tweaking" (you can copy the config if you want 
to customize it/keep it around so Seam Generate Entitites won't override it 
next time you try it for the same project)

anonymous wrote : 
  | As well, the CRUD pages generate-entities creates are interesting from the 
standpoint of a demo, and for seeing how they are done, however, I am not 
convinced I would want these pages for creating and updating generated for each 
table

We are planning to add more selective generation for the artifacts/tables.

anonymous wrote : 
  |  (For example, that is not how to handle an associative table that 
implements a many-many relationship).

Yes - the seam-gen templates that we use does not support many-to-many yet 
(feel free to contribute ;)

anonymous wrote : 
  |   So generate-entities seems to create a lot of things that have to be 
edited/deleted.  (apropos names, it generates a lot more than entities)
  | 

Again, if you think some of the *automatic* code generation can be generally 
improved or something is generated wrong then please report it in jira. 

anonymous wrote : 
  | I may be wrong in the above feelings, but in any case, generating EJB3 
entities/session beans is a useful separate thing from getting everything seam 
generate entities creates.  
  | 

Yes - so use hibernate tools generation to select what you want; this is a 2 
year old featureset - its only Seam Generate Entities that is "new" ;)
(The "single table" entity generation is not there yet, but will be added in 
upcoming releases)

anonymous wrote : Is there a place that the use cases for RHDS are described?

We have the documentation for the various plugins and some new docs in the 
pipeline (see above for the hibernate tools part)

The closest we get to a documented dev usecase set for the seam features is at 
http://anonsvn.jboss.org/repos/jbosstools/trunk/documentation/development/usecases/

But these were just for the new Seam related parts.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103406#4103406

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103406
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to