Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HibernateDomainExporter and composite-element #219

lallafa opened this issue Aug 22, 2012 · 1 comment

HibernateDomainExporter and composite-element #219

lallafa opened this issue Aug 22, 2012 · 1 comment


Copy link

@lallafa lallafa commented Aug 22, 2012

Our hibernate mapping uses composite-elements which leads to errors in the generated Q classes.

  <class name="Contact" table="CONTACT" mutable="false">
    <id name="id" column="ID">
      <generator class="increment" />
    <property name="name" column="name" not-null="true" />
    <list name="phoneNumbers" table="CONTACT_PHONE_NUMBER" lazy="false">
        <key column="CONTACT_ID"/>
        <list-index column="INDEX" base="0"/>
        <composite-element class="PhoneNumber">
            <property name="type"/>
            <property name="number" />
public class Contact {

    protected long id;
    protected String name;
    protected List<PhoneNumber> phoneNumbers;

    public long getId() { return id; }
    public void setId(long id) { = id; }

    public String getName() { return name; }
    public void setName(String name) { = name; }

    public List<PhoneNumber> getPhoneNumbers() { return phoneNumbers; }
    public void setPhoneNumbers(List<PhoneNumber> phoneNumbers) {  this.phoneNumbers = phoneNumbers;  }

public class PhoneNumber {

    protected String type;
    protected String number;

    public String getNumber() { return number; }
    public void setNumber(String number) { this.number = number; }

    public String getType() { return type; }
    public void setType(String type) { this.type = type; }

The code generated Contact.phoneNumbers is:

public class QContact extends EntityPathBase<Contact> {
    public final ListPath<PhoneNumber, Path<PhoneNumber>> phoneNumbers = this.<PhoneNumber, Path<PhoneNumber>>createList("phoneNumbers", PhoneNumber.class, Path.class);

The errors are:[25,43] type parameter com.mysema.query.types.Path<PhoneNumber> is not within its bound[25,77] <A,E>createList(java.lang.String,java.lang.Class<? super A>,java.lang.Class<? super E>) in com.mysema.query.types.path.BeanPath<Contact> cannot be applied to <PhoneNumber,com.mysema.query.types.Path<PhoneNumber>>(java.lang.String,java.lang.Class<PhoneNumber>,java.lang.Class<com.mysema.query.types.Path>)
timowest added a commit that referenced this issue Aug 22, 2012
Copy link

@timowest timowest commented Sep 10, 2012

Released in 2.7.3

@timowest timowest closed this Sep 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants