[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4433) seam:gen generate-ui produces bad home* and list* for entites that are N-N relationships

Tomasz Bartczak (JIRA) jira-events at lists.jboss.org
Fri Oct 2 08:11:49 EDT 2009


seam:gen generate-ui produces bad home* and list* for entites that are N-N relationships
----------------------------------------------------------------------------------------

                 Key: JBSEAM-4433
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4433
             Project: Seam
          Issue Type: Bug
          Components: Tools
    Affects Versions: 2.2.0.GA
            Reporter: Tomasz Bartczak


class like

public class FilmActor implements Serializable {

	private static final long serialVersionUID = 1L;

	@EmbeddedId
	protected FilmActorPK filmActorPK;

	@JoinColumn(name = "actor_id", referencedColumnName = "actor_id", nullable = false, insertable = false, updatable = false)
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	private Actor actor;

	@JoinColumn(name = "film_id", referencedColumnName = "film_id", nullable = false, insertable = false, updatable = false)
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	private Film film;

gives bad home:

[...]

	public FilmActorId getFilmActorFilmActorPK() {
		return (FilmActorId) getId();
	}

[...]
because there is no FilmActorId - there is FilmActorPK

and
	@Override
	protected FilmActor createInstance() {
		FilmActor filmActor = new FilmActor();
		filmActor.setId(new FilmActorId()); //error
		return filmActor;
	}

because there should be filmActor.setFilmActorPK(new FilmActorPK());


-- 
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

        


More information about the seam-issues mailing list