Skip to main content



      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 15:22 Go to next message
Eclipse UserFriend
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 16:07 Go to previous messageGo to next message
Eclipse UserFriend
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 12:43 Go to previous message
Eclipse UserFriend
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:duplicate post...admin please delete
Next Topic:Status of how users with multiple projects should use dali/persistence.xml and <jar-file >
Goto Forum:
  


Current Time: Sun Jul 13 22:31:56 EDT 2025

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

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

Back to the top