Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Does EclipseLink avoid the restrictions of Toplink Essentials? (Performance issues)

1)  Yes, EclipseLink does allow adding to (lazy) collection without
instantiating them.  You must ensure the relationship is lazy and that you
use weaving and attribute change tracking (default when weaving).

In general you may be better off not mapping the lazy collection if you
never want to instantiate it.  Also be careful you do not call other methods
on the collection which require it to be instantiated.

2) Sort of, EclipseLink does support this in Oracle, but I do not think
currently on other platforms.  You could potentially extend your own MySQL
platform to do this (perhaps contribute it back to the community as well).

zebhed wrote:
> Right now, I am using Toplink Essentials bundled with Glassfish v2. But
> TLE has some serious restrictions. Does EclipseLink have the same
> restrictions?! 
> 1.) Adding an entity to a collection (1:N relationship)
> I have an entitiy "University" that has a OneToMany unidirectional
> relationship to entity "Student". Now I want to add one student to a
> university. So I call: "university.getStudents().add(new Student(...));"
> In Toplink Essentials, afaik, getStudents() will fetch ALL students that
> belong to the university, and afterwards, one student will be added.
> Getting all students although I only want to add one student does not make
> any sense. Is EclipseLink able to just add one student without retrieving
> all the other students? If yes, how will this be accomplished? (afaik,
> Toplink 11g has this feature)
> 2.) Pagination (MySQL)
> I am using a MySQL 5 Database. JPA supports pagination through the methods
> "setFirstResult(...)" and "setMaxResults(...)". When executing a query
> with firstResults and maxResults being set, Toplink Essentials will NOT
> create an SQL statement with a LIMIT clause (the LIMIT clause is used to
> constrain the number of rows). So all database rows are fetched. Will
> EclipseLink behave the same or does it produce a "correct" SQL statement
> that includes the LIMIT clause? For me, this is a very important
> requirement.
> Please, all questions should be answered with EclipseLink Release 1.0 in
> mind. Unfortunately, I cannot wait for EclipseLink 2.0.

--- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top