0 Replies Latest reply on Jan 25, 2007 1:53 AM by Leo Baschy

    couldn't run seam generate-entities twice, found workaround

    Leo Baschy Novice

      Ran seam generate-entities a couple of weeks ago. Wanted to know what has changed in Seam, wanted to run seam generate-entities a second time and then diff the directories. Problem:

      At seam-gen/view/list.xhtml.ftl line 30 there was an undefined property.value.typeName.

      But the real reason then was that two weeks ago I had seven tables, and seam-gen generated code that then made that nine tables (generally good Hibernate magic). Seam-gen must have added some relations, is my first simplistic interpretation. (I never used that generated project per se, I scavenged from it, so I don't know all its details.)

      How did I work around it? I compared the entity classes from last week, (there were seven), with the tables in the database (there were nine) and dropped those two extra tables. Then seam-gen ran fine again.

      Maybe it had to do with many-to-many relationships? There are two in it. I could look closer, but for now I have deleted all bad versions.

      To sum it up: Seam-gen may cause generation of additional tables (only once the app runs, of course). When trying to run seam-gen again (e.g. much later to see whether Seam has changed with a diff) then those additional tables not just are unwanted, but they also cause a failure at least in list.xhtml.ftl.