Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Potentially spurious validation message about attribute mapping?
Potentially spurious validation message about attribute mapping? [message #897023] Fri, 20 July 2012 19:22 Go to next message
David Vree is currently offline David VreeFriend
Messages: 45
Registered: July 2010
Member
Dali has just today started to throw an error on some JPA annotations that have been working for quite some time. I really don't know why these errors popped up today, but in any event here is what is going on.

It is essentially the exact same error and situation reported here in 2009:

http://www.eclipse.org/forums/index.php/t/156133/

I have a bidirectional OneToMany...here is the annotations on the parent object and the child object:

Class Parent {

   ...

   @Override
   @OneToMany(targetEntity = ClassVersion.class, mappedBy = "parent", cascade = { PERSIST, REMOVE })
   @OrderBy("versionNum")
   public List<Child> getVersions() {
	return super.getVersions();
   }
}

Class Child {

   ...

   @Override
   @ManyToOne(targetEntity = Parent.class, optional = false)
   @JoinColumn(name = "parent_id", referencedColumnName = "uuid", updatable = false, nullable = false)
   public Parent getParent() {
	return (Parent) super.getParent();
   }
}


The error message is in the parent class and says that the attribute mapped by "parent" has an invalid mapping type for this relationship.

The code compiles and runs just fine. It produces a table for the parent and a table for the child with the column "parent_id" and appropriate constraints.
Re: Potentially spurious validation message about attribute mapping? [message #898600 is a reply to message #897023] Thu, 26 July 2012 20:07 Go to previous messageGo to next message
Karen Butzke is currently offline Karen ButzkeFriend
Messages: 220
Registered: July 2009
Senior Member
Did you upgrade your Dali plugins, maybe to Juno?

Could you give a more full example? Your example doesn't compile and I'm having trouble completing it and attempting to get the validation error.

Thanks,
Karen
Re: Potentially spurious validation message about attribute mapping? [message #899650 is a reply to message #898600] Wed, 01 August 2012 16:43 Go to previous message
David Vree is currently offline David VreeFriend
Messages: 45
Registered: July 2010
Member
Currently I am running Eclipse Indigo with:

Dali Java Persistence Tools - JPA Support - 3.0.2.v201110193010

Sounds like I should try Juno...I can do that, but it will take some weeks to do that. Will report back either way when I do.
Previous Topic:cannot use eclipselink 2.x
Next Topic:JPQL validation error: well-formed character data or markup
Goto Forum:
  


Current Time: Mon Dec 22 00:11:47 GMT 2014

Powered by FUDForum. Page generated in 0.02346 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software