<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-26658</id>
	<title>Nabble - EclipseLink - Users</title>
	<updated>2009-11-20T07:32:26Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/EclipseLink---Users-f26658.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/EclipseLink---Users-f26658.html" />
	<subtitle type="html">This forum is for user questions.
&lt;br&gt;You must subscribe to this list to allow posting.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26443298</id>
	<title>Re: Failed insert results in invalid cache state</title>
	<published>2009-11-20T07:32:26Z</published>
	<updated>2009-11-20T07:32:26Z</updated>
	<author>
		<name>bryans</name>
	</author>
	<content type="html">James,
&lt;br&gt;&amp;nbsp; This is a response to a previous comment you made. I had to drop this research for projects but now i'm back on it. I wanted to follow up with something you mentioned:
&lt;br&gt;&lt;br&gt;&amp;nbsp;(EclipseLink will never generate duplicates).
&lt;br&gt;&lt;br&gt;What type of ID generator are you referring to? And, how is the guarantee made (in a clustered environment)? I can only think of a few ways:
&lt;br&gt;&lt;br&gt;1) A database table manages the sequences (select from table, auto-update to next value)
&lt;br&gt;2) EclipseLink validates the value does not already exist as an ID in the table prior to assigning it to the object. However this doesn't guarantee that the ID won't be assigned by another process elsewhere, inserting into the same table.
&lt;br&gt;3) In the above instance, a sequence manager manages state across all instance of EclipseLink in use.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;James Sutherland wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;This is pretty advanced stuff, so you may want to reconsider you reasons for trying to do this in the first place. &amp;nbsp;You might want to instead catch the exception in your app and retry the whole transaction, or avoid having duplicate sequence numbers in the first place (EclipseLink will never generate duplicates).
&lt;br&gt;&lt;br&gt;To get your exception handler to work, you can't create a copy, as it violates object identity. &amp;nbsp;You need to reset the object's pk to null. &amp;nbsp;You could use the descriptor to do this generically.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Object value = builder.getSequenceMapping().getAttributeValue(null, session);
&lt;br&gt;builder.getSequenceMapping().setAttributeValueInObject(dup, value);
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Failed-insert-results-in-invalid-cache-state-tp25384148p26443298.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26430082</id>
	<title>batch-writing mode Oracle-JDBC leads to integrity constraint exception when a class contains lob field</title>
	<published>2009-11-19T09:04:14Z</published>
	<updated>2009-11-19T09:04:14Z</updated>
	<author>
		<name>Hans Harz-2</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I encountered another problem with Lob fields. Do you think this is a Bug in EclipseLink, Oracle or expected behavior.
&lt;br&gt;&lt;br&gt;Given: 
&lt;br&gt;A Test that 
&lt;br&gt;- open a transaction
&lt;br&gt;- inserts a lot of Classes A with a Lob Field
&lt;br&gt;- Then insert some classes B that referencing class A with a manyToMany-Mapping.
&lt;br&gt;- Commit Transaction
&lt;br&gt;&lt;br&gt;When
&lt;br&gt;&amp;lt;property name=&amp;quot;eclipselink.jdbc.batch-writing&amp;quot; value=&amp;quot;Oracle-JDBC&amp;quot; /&amp;gt;
&lt;br&gt;Then we get an java.sql.SQLException: ORA-02291 - Parent-Key not found. 
&lt;br&gt;You see all necessary inserts into table A in the log. But the insert into the mapping table fails, although the id is correct and should be there.
&lt;br&gt;&lt;br&gt;When 
&lt;br&gt;&amp;lt;property name=&amp;quot;eclipselink.jdbc.batch-writing&amp;quot; value=&amp;quot;JDBC&amp;quot; /&amp;gt;
&lt;br&gt;Then everything runs fine.
&lt;br&gt;&lt;br&gt;When the tests is executed with H2 or DB2 everything runs fine.
&lt;br&gt;&lt;br&gt;And also we think to remember, that with the Oracle-JDBC setting and toplink the test runs fine.
&lt;br&gt;&lt;br&gt;regards,
&lt;br&gt;Hans
&lt;br&gt;______________________________________________________
&lt;br&gt;GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
&lt;br&gt;Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430082&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/batch-writing-mode-Oracle-JDBC-leads-to-integrity-constraint-exception-when-a-class-contains-lob-field-tp26430082p26430082.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26411786</id>
	<title>Re: IndirectMap.containsKey leads to Exception because, DISTINCT on @Lob-Field</title>
	<published>2009-11-18T09:13:17Z</published>
	<updated>2009-11-18T09:13:17Z</updated>
	<author>
		<name>Reinhard Girstenbrei</name>
	</author>
	<content type="html">Hi Hans,
&lt;br&gt;the stack trace shows that you are using a query optimization feature 
&lt;br&gt;called batch reading
&lt;br&gt;&lt;br&gt;e.g.
&lt;br&gt;&lt;br&gt;@NamedQuery(
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;hints= {
&lt;br&gt;&lt;br&gt;@QueryHint(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name=QueryHints.BATCH, 
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&lt;br&gt;Batch reading and an attributed mapped to a LOB column run into this 
&lt;br&gt;problem.
&lt;br&gt;As James described there are two possible solutions:
&lt;br&gt;1. Do not use batch reading.
&lt;br&gt;or
&lt;br&gt;2. Add another releationship mapping to an entity object that maps the 
&lt;br&gt;LOB column.
&lt;br&gt;For this relationship mapping no batch reading should be used.
&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;Reinhard
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users-request@...&lt;/a&gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Send eclipselink-users mailing list submissions to
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; To subscribe or unsubscribe via the World Wide Web, visit
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt; or, via email, send a message with subject or body 'help' to
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users-request@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You can reach the person managing the list at
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users-owner@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When replying, please edit your Subject line so it is more specific
&lt;br&gt;&amp;gt; than &amp;quot;Re: Contents of eclipselink-users digest...&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Today's Topics:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;1. Re: IndirectMap.containsKey leads to Exception because
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; DISTINCT on @Lob-Field (Hans Harz)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;2. Re: Defining persistence.xml programmatically? (dhermanns)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;3. Re: ReadAllQuery fetch all (Janda Martin)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;4. Re: ReadAllQuery fetch all (christopher delahunt)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 1
&lt;br&gt;&amp;gt; Date: Wed, 18 Nov 2009 11:21:30 +0100
&lt;br&gt;&amp;gt; From: Hans Harz &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hansharz_eclipselink@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: [eclipselink-users] IndirectMap.containsKey leads to
&lt;br&gt;&amp;gt; 	Exception because DISTINCT on @Lob-Field
&lt;br&gt;&amp;gt; To: EclipseLink User Discussions &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;1854269327@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain; charset=iso-8859-15
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi James, Hi Reinhard,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; thank you very much for your answers. 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm not sure about your suggested workaround. How can I set the dontUseDistinct() property on the query, when I don't specify the query manually.
&lt;br&gt;&amp;gt; Is there a annotation based possibility on the Many-to-Many property? 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Right now the field in the owning class looks like this:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @MapKey(name = &amp;quot;typeId&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @XStreamAlias(&amp;quot;customFields&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; private Map&amp;lt;CustomFieldType, CustomFieldValue&amp;gt; customFields;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; and the CustomFieldValue class contains the Clob Field
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;@Lob
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @Column(nullable = true)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @XStreamAlias(&amp;quot;stringValue&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; private String stringValue;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I searched the API and documentation but can't find anything.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Because the exception appeared at one of our customers a hint to a workaround through editing the persistence.xml and the orm.xml would be great.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks in advance,
&lt;br&gt;&amp;gt; Hans
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; -----Ursprüngliche Nachricht-----
&lt;br&gt;&amp;gt;&amp;gt; Von: &amp;quot;James Sutherland&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jamesssss@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Gesendet: 17.11.09 19:42:42
&lt;br&gt;&amp;gt;&amp;gt; An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Betreff: Re: [eclipselink-users] IndirectMap.containsKey leads to Exception because DISTINCT on @Lob-Field
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; The distinct is used because you are using batch reading on the query. &amp;nbsp;If
&lt;br&gt;&amp;gt;&amp;gt; you do not set batch reading on the query then you will not have the issue. 
&lt;br&gt;&amp;gt;&amp;gt; Batch reading uses a distinct to avoid fetching duplicate data. &amp;nbsp;You can
&lt;br&gt;&amp;gt;&amp;gt; disable the usage of the distinct by setting dontUseDistinct() on the
&lt;br&gt;&amp;gt;&amp;gt; original batch query. &amp;nbsp;But then you will be selecting duplicate potentially.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You could also try moving the Lob to another table, or use a fetch group
&lt;br&gt;&amp;gt;&amp;gt; (LAZY) on the Lob to avoid selecting it by default.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; We could probably try to auto-detect a Lob field in the descriptor and not
&lt;br&gt;&amp;gt;&amp;gt; add the distinct, so you could log a bug for that.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hans Harz-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I encountered a problem in our application. Maybe some of you can help me.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Using 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - EclipseLink 1.1.3
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - Given a class A with a @Lob Field String stringValue;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; - Given class B with 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; @MapKey(name = &amp;quot;field&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; private Map&amp;lt;AType, A&amp;gt; As;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; When I call As.containsKey(someAType) on the lazy loaded map 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Then a Query with a DISTINCT is created.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; SELECT DISTINCT ...,t0.stringValue,...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; this leads to the following exception on oracle databases (and we made a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; test with DB2 and it also fails)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ORA-00932: inconsistent datatypes: expected - got CLOB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This is because DISTINCT queries are not allowed on BLOB or CLOB fields. 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is this expected behavior?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Did we miss a restriction of eclipselink? 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is there a way to not generate the query without DISTINCT?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; In toplink we never had this problem, so it seems that toplink did not
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; generate the DISTINCT.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Here is the Stack Trace.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hans
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.exceptions.DatabaseException: Internal Exception:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; CLOB Error Code: 932 Call: SELECT DISTINCT t1.ID, t1.EXPLICITVERSION,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; t1.STRINGVALUE, t1.UUID, .....
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:332) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:667) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:512) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:536) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:599) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2518) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2476) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:481) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:928) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:889) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:458) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2244) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1165) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.mappings.ManyToManyMapping.extractResultFromBatchQuery(ManyToManyMapping.java:231) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.indirection.BatchValueHolder.instantiate(BatchValueHolder.java:58) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:71) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:161) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:230) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.indirection.IndirectMap.buildDelegate(IndirectMap.java:110) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.indirection.IndirectMap.getDelegate(IndirectMap.java:316) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; org.eclipse.persistence.indirection.IndirectMap.containsKey(IndirectMap.java:165) 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; _____________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 16,99 Euro/mtl.!* Hier klicken: &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; -----
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://wiki.eclipse.org/User:James.sutherland.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/User:James.sutherland.oracle.com&lt;/a&gt;&amp;nbsp;James Sutherland 
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.eclipse.org/eclipselink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eclipse.org/eclipselink/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;EclipseLink , &amp;nbsp;&lt;a href=&quot;http://www.oracle.com/technology/products/ias/toplink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com/technology/products/ias/toplink/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; TopLink 
&lt;br&gt;&amp;gt;&amp;gt; Wiki: &amp;nbsp;&lt;a href=&quot;http://wiki.eclipse.org/EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/EclipseLink&lt;/a&gt;&amp;nbsp;EclipseLink , 
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://wiki.oracle.com/page/TopLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.oracle.com/page/TopLink&lt;/a&gt;&amp;nbsp;TopLink 
&lt;br&gt;&amp;gt;&amp;gt; Forums: &amp;nbsp;&lt;a href=&quot;http://forums.oracle.com/forums/forum.jspa?forumID=48&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.oracle.com/forums/forum.jspa?forumID=48&lt;/a&gt;&amp;nbsp;TopLink , 
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/EclipseLink-f26430.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/EclipseLink-f26430.html&lt;/a&gt;&amp;nbsp;EclipseLink 
&lt;br&gt;&amp;gt;&amp;gt; Book: &amp;nbsp;&lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikibooks.org/wiki/Java_Persistence&lt;/a&gt;&amp;nbsp;Java Persistence 
&lt;br&gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/IndirectMap.containsKey-leads-to-Exception-because-DISTINCT-on-%40Lob-Field-tp26390360p26395252.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/IndirectMap.containsKey-leads-to-Exception-because-DISTINCT-on-%40Lob-Field-tp26390360p26395252.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Sent from the EclipseLink - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _____________________________________________________________
&lt;br&gt;&amp;gt; DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für 
&lt;br&gt;&amp;gt; 16,99 Euro/mtl.!* Hier klicken: &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 2
&lt;br&gt;&amp;gt; Date: Wed, 18 Nov 2009 03:08:19 -0800 (PST)
&lt;br&gt;&amp;gt; From: dhermanns &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;d.hermanns@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: [eclipselink-users] Defining persistence.xml
&lt;br&gt;&amp;gt; 	programmatically?
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;26405973.post@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain; charset=us-ascii
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for the hint.
&lt;br&gt;&amp;gt; I filed it and you can find it here now:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://bugs.eclipse.org/bugs/show_bug.cgi?id=295427&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=295427&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hopefully i was able to express what we would really appreciate to have ;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Shaun Smith wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; You can enter a bug/enhancement request in Eclipse's bugzilla. &amp;nbsp;You'll 
&lt;br&gt;&amp;gt;&amp;gt; need to create an account before you can enter a bug. &amp;nbsp;EclipseLink is an 
&lt;br&gt;&amp;gt;&amp;gt; RT project and here's a quick link to entering an EclipseLink bug: 
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Shaun
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Oracle &amp;lt;&lt;a href=&quot;http://www.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com&lt;/a&gt;&amp;gt;
&lt;br&gt;Reinhard Girstenbrei | Senior Principal Technical Support Engineer
&lt;br&gt;Phone: +498914302318 | Mobile: +491775941318
&lt;br&gt;Oracle Oracle Customer Service
&lt;br&gt;&lt;br&gt;ORACLE Deutschland GmbH | Riesstr. 25 | 80992 München
&lt;br&gt;&lt;br&gt;ORACLE Deutschland GmbH, Hauptverwaltung: Riesstraße 25, D-80992 München
&lt;br&gt;Geschäftsführer: Jürgen Kunz, Registergericht: Amtsgericht München, HRB 
&lt;br&gt;82775
&lt;br&gt;Green Oracle &amp;lt;&lt;a href=&quot;http://www.oracle.com/commitment&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com/commitment&lt;/a&gt;&amp;gt; 	Oracle is committed to 
&lt;br&gt;developing practices and products that help protect the environment
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26411786&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-IndirectMap.containsKey-leads-to-Exception-because%2C-DISTINCT-on-%40Lob-Field-tp26411786p26411786.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26408334</id>
	<title>Re: ReadAllQuery fetch all</title>
	<published>2009-11-18T05:58:49Z</published>
	<updated>2009-11-18T05:58:49Z</updated>
	<author>
		<name>christopher delahunt</name>
	</author>
	<content type="html">Hello Martin,
&lt;br&gt;&lt;br&gt;&amp;nbsp;I do not believe joining (or batch reading, another option) on a 
&lt;br&gt;collection mapping will work when using a cursor. &amp;nbsp;Joining will cause 
&lt;br&gt;multiple rows to be associated to the object, but the cursor will 
&lt;br&gt;prevent going through the entire result set to build the object, so the 
&lt;br&gt;returned objects will be based on a single row - and so collections will 
&lt;br&gt;be incomplete. &amp;nbsp;Batching may work, but since the batch query to bring in 
&lt;br&gt;references is based on the original query, it negates the value of using 
&lt;br&gt;a cursor as all the collection objects will be read in at once. 
&lt;br&gt;&lt;br&gt;What I would suggest instead is using pagination to read in batches - 
&lt;br&gt;for instance ordering results and setting the first row/max results on 
&lt;br&gt;the query object to return a manageable size of results. &amp;nbsp;A fetch join 
&lt;br&gt;can then be used since all rows returned will be used to create the objects.
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;Chris
&lt;br&gt;&lt;br&gt;Janda Martin wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thank you, I tried &amp;quot;addJoinedAttribute&amp;quot; but theres problem. It doesn't work. It changed generated SQL command to use &amp;quot;select distinct e ...&amp;quot; instead of &amp;quot;select o ...&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;entityClass&amp;gt; has 4 lazy,optional OneToMany mappings that I nead to be fetched.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @OneToMany(mappedBy = &amp;quot;datas&amp;quot;, cascade = CascadeType.ALL)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @OrderBy(&amp;quot;dataType, azimut&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; private List&amp;lt;DData&amp;gt; dDataCollection;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ReadAllQuery readAllQuery = new ReadAllQuery(&amp;lt;entityClass&amp;gt;);
&lt;br&gt;&amp;gt; readAllQuery.setJPQLString(&amp;quot;select object(o) from &amp;lt;table&amp;gt;&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ScrollableCursorPolicy policy = new ScrollableCursorPolicy();
&lt;br&gt;&amp;gt; policy.setPageSize(200);
&lt;br&gt;&amp;gt; policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_INSENSITIVE);
&lt;br&gt;&amp;gt; policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; readAllQuery.useScrollableCursor(policy);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; // your suggestion
&lt;br&gt;&amp;gt; readAllQuery.addJoinedAttribute(readAllQuery.getExpressionBuilder().anyOf(&amp;quot;dDataCollection&amp;quot;));
&lt;br&gt;&amp;gt; // or - second one uses &amp;quot;get&amp;quot; instead of &amp;quot;anyOf&amp;quot; - throws exception
&lt;br&gt;&amp;gt; readAllQuery.addJoinedAttribute(&amp;quot;dDataCollection&amp;quot;);
&lt;br&gt;&amp;gt; // select distinct ... is generated on query execution
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ScrollableCursor scrollableCursor = (ScrollableCursor) uow.executeQuery(readAllQuery);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've tried FetchGroup but I get exception that FetchGroupManager isn't set/installed.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Correctly and as I expect works only fetch = EAGER. There is generated new select DData for every entity.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It would be great to have some kind of QueryHint/boolean property on DatabaseQuery to disable lazy loading.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; Please can you give me another advice how to make it. I think that my problem is typical for Java SE applications when you need select some entities from database. Close all connections and run some computation on selected entities.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; Martin
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt; From: &amp;quot;Tom Ware&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26408334&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tom.ware@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; To: &amp;quot;EclipseLink User Discussions&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26408334&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sent: Tuesday, November 17, 2009 3:09:44 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
&lt;br&gt;&amp;gt; Subject: Re: [eclipselink-users] ReadAllQuery fetch all
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi Martin,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;If you are using JPQL, JPQL allows you to specify fetch joins that will cause 
&lt;br&gt;&amp;gt; relationships to be automatically loaded. &amp;nbsp;Have you tried that?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;If you are using EclipseLink expressions, there is an addJoinedAttribute 
&lt;br&gt;&amp;gt; method you can use on your query.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Tom
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Martin Janda wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; can you help me? please. I have Entity with lazy mappings. I need to 
&lt;br&gt;&amp;gt;&amp;gt; read all Entity attributes Eager&amp;Lazy trough ReadAllQuery 
&lt;br&gt;&amp;gt;&amp;gt; (ScrollableCursor) and detach them. I need to use Entities after closing 
&lt;br&gt;&amp;gt;&amp;gt; EM and EMF. So they can no longer fetch lazy mappings.
&lt;br&gt;&amp;gt;&amp;gt; I need to work with selected Entities from JTable (needs lazy) in 
&lt;br&gt;&amp;gt;&amp;gt; another context (needs all attributes including lazy mappings).
&lt;br&gt;&amp;gt;&amp;gt; Is there any way how to do it in EclipseLink 1.1.3 Java SE, I prefer 
&lt;br&gt;&amp;gt;&amp;gt; annotations or direct methods in EM/EMF/UOW.
&lt;br&gt;&amp;gt;&amp;gt; Thank you very much.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;Martin
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; PS Sorry for my english
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26408334&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26408334&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26408334&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26408334&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ReadAllQuery-fetch-all-tp26380381p26408334.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26407560</id>
	<title>Re: ReadAllQuery fetch all</title>
	<published>2009-11-18T05:18:36Z</published>
	<updated>2009-11-18T05:18:36Z</updated>
	<author>
		<name>jandam</name>
	</author>
	<content type="html">Thank you, I tried &amp;quot;addJoinedAttribute&amp;quot; but theres problem. It doesn't work. It changed generated SQL command to use &amp;quot;select distinct e ...&amp;quot; instead of &amp;quot;select o ...&amp;quot;.
&lt;br&gt;&lt;br&gt;&amp;lt;entityClass&amp;gt; has 4 lazy,optional OneToMany mappings that I nead to be fetched.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @OneToMany(mappedBy = &amp;quot;datas&amp;quot;, cascade = CascadeType.ALL)
&lt;br&gt;&amp;nbsp; &amp;nbsp; @OrderBy(&amp;quot;dataType, azimut&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; private List&amp;lt;DData&amp;gt; dDataCollection;
&lt;br&gt;&lt;br&gt;&lt;br&gt;ReadAllQuery readAllQuery = new ReadAllQuery(&amp;lt;entityClass&amp;gt;);
&lt;br&gt;readAllQuery.setJPQLString(&amp;quot;select object(o) from &amp;lt;table&amp;gt;&amp;quot;);
&lt;br&gt;&lt;br&gt;ScrollableCursorPolicy policy = new ScrollableCursorPolicy();
&lt;br&gt;policy.setPageSize(200);
&lt;br&gt;policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_INSENSITIVE);
&lt;br&gt;policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);
&lt;br&gt;&lt;br&gt;readAllQuery.useScrollableCursor(policy);
&lt;br&gt;&lt;br&gt;// your suggestion
&lt;br&gt;readAllQuery.addJoinedAttribute(readAllQuery.getExpressionBuilder().anyOf(&amp;quot;dDataCollection&amp;quot;));
&lt;br&gt;// or - second one uses &amp;quot;get&amp;quot; instead of &amp;quot;anyOf&amp;quot; - throws exception
&lt;br&gt;readAllQuery.addJoinedAttribute(&amp;quot;dDataCollection&amp;quot;);
&lt;br&gt;// select distinct ... is generated on query execution
&lt;br&gt;&lt;br&gt;ScrollableCursor scrollableCursor = (ScrollableCursor) uow.executeQuery(readAllQuery);
&lt;br&gt;&lt;br&gt;&lt;br&gt;I've tried FetchGroup but I get exception that FetchGroupManager isn't set/installed.
&lt;br&gt;&lt;br&gt;Correctly and as I expect works only fetch = EAGER. There is generated new select DData for every entity.
&lt;br&gt;&lt;br&gt;It would be great to have some kind of QueryHint/boolean property on DatabaseQuery to disable lazy loading.
&lt;br&gt;&lt;br&gt;&amp;nbsp; Please can you give me another advice how to make it. I think that my problem is typical for Java SE applications when you need select some entities from database. Close all connections and run some computation on selected entities.
&lt;br&gt;&lt;br&gt;&amp;nbsp; Martin
&lt;br&gt;&lt;br&gt;----- Original Message -----
&lt;br&gt;From: &amp;quot;Tom Ware&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26407560&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tom.ware@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;quot;EclipseLink User Discussions&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26407560&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Tuesday, November 17, 2009 3:09:44 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
&lt;br&gt;Subject: Re: [eclipselink-users] ReadAllQuery fetch all
&lt;br&gt;&lt;br&gt;Hi Martin,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;If you are using JPQL, JPQL allows you to specify fetch joins that will cause 
&lt;br&gt;relationships to be automatically loaded. &amp;nbsp;Have you tried that?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;If you are using EclipseLink expressions, there is an addJoinedAttribute 
&lt;br&gt;method you can use on your query.
&lt;br&gt;&lt;br&gt;-Tom
&lt;br&gt;&lt;br&gt;Martin Janda wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;nbsp; can you help me? please. I have Entity with lazy mappings. I need to 
&lt;br&gt;&amp;gt; read all Entity attributes Eager&amp;Lazy trough ReadAllQuery 
&lt;br&gt;&amp;gt; (ScrollableCursor) and detach them. I need to use Entities after closing 
&lt;br&gt;&amp;gt; EM and EMF. So they can no longer fetch lazy mappings.
&lt;br&gt;&amp;gt; I need to work with selected Entities from JTable (needs lazy) in 
&lt;br&gt;&amp;gt; another context (needs all attributes including lazy mappings).
&lt;br&gt;&amp;gt; Is there any way how to do it in EclipseLink 1.1.3 Java SE, I prefer 
&lt;br&gt;&amp;gt; annotations or direct methods in EM/EMF/UOW.
&lt;br&gt;&amp;gt; Thank you very much.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Martin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; PS Sorry for my english
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26407560&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26407560&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26407560&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ReadAllQuery-fetch-all-tp26380381p26407560.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26405973</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-18T03:08:15Z</published>
	<updated>2009-11-18T03:08:15Z</updated>
	<author>
		<name>dhermanns</name>
	</author>
	<content type="html">Thanks for the hint.
&lt;br&gt;I filed it and you can find it here now:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://bugs.eclipse.org/bugs/show_bug.cgi?id=295427&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=295427&lt;/a&gt;&lt;br&gt;&lt;br&gt;Hopefully i was able to express what we would really appreciate to have ;)
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Shaun Smith wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;You can enter a bug/enhancement request in Eclipse's bugzilla. &amp;nbsp;You'll 
&lt;br&gt;need to create an account before you can enter a bug. &amp;nbsp;EclipseLink is an 
&lt;br&gt;RT project and here's a quick link to entering an EclipseLink bug: 
&lt;br&gt;&lt;a href=&quot;https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Shaun
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26405973.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26405407</id>
	<title>Re: IndirectMap.containsKey leads to Exception because DISTINCT on @Lob-Field</title>
	<published>2009-11-18T02:21:30Z</published>
	<updated>2009-11-18T02:21:30Z</updated>
	<author>
		<name>Hans Harz-2</name>
	</author>
	<content type="html">Hi James, Hi Reinhard,
&lt;br&gt;&lt;br&gt;thank you very much for your answers. 
&lt;br&gt;&lt;br&gt;I'm not sure about your suggested workaround. How can I set the dontUseDistinct() property on the query, when I don't specify the query manually.
&lt;br&gt;Is there a annotation based possibility on the Many-to-Many property? 
&lt;br&gt;&lt;br&gt;Right now the field in the owning class looks like this:
&lt;br&gt;&amp;nbsp; &amp;nbsp; @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
&lt;br&gt;&amp;nbsp; &amp;nbsp; @MapKey(name = &amp;quot;typeId&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; @XStreamAlias(&amp;quot;customFields&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; private Map&amp;lt;CustomFieldType, CustomFieldValue&amp;gt; customFields;
&lt;br&gt;&lt;br&gt;and the CustomFieldValue class contains the Clob Field
&lt;br&gt;&amp;nbsp; &amp;nbsp;@Lob
&lt;br&gt;&amp;nbsp; &amp;nbsp; @Column(nullable = true)
&lt;br&gt;&amp;nbsp; &amp;nbsp; @XStreamAlias(&amp;quot;stringValue&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; private String stringValue;
&lt;br&gt;&lt;br&gt;I searched the API and documentation but can't find anything.
&lt;br&gt;&lt;br&gt;Because the exception appeared at one of our customers a hint to a workaround through editing the persistence.xml and the orm.xml would be great.
&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;Hans
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; -----Ursprüngliche Nachricht-----
&lt;br&gt;&amp;gt; Von: &amp;quot;James Sutherland&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26405407&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jamesssss@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Gesendet: 17.11.09 19:42:42
&lt;br&gt;&amp;gt; An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26405407&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Betreff: Re: [eclipselink-users] IndirectMap.containsKey leads to Exception because DISTINCT on @Lob-Field
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The distinct is used because you are using batch reading on the query. &amp;nbsp;If
&lt;br&gt;&amp;gt; you do not set batch reading on the query then you will not have the issue. 
&lt;br&gt;&amp;gt; Batch reading uses a distinct to avoid fetching duplicate data. &amp;nbsp;You can
&lt;br&gt;&amp;gt; disable the usage of the distinct by setting dontUseDistinct() on the
&lt;br&gt;&amp;gt; original batch query. &amp;nbsp;But then you will be selecting duplicate potentially.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You could also try moving the Lob to another table, or use a fetch group
&lt;br&gt;&amp;gt; (LAZY) on the Lob to avoid selecting it by default.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; We could probably try to auto-detect a Lob field in the descriptor and not
&lt;br&gt;&amp;gt; add the distinct, so you could log a bug for that.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hans Harz-2 wrote:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi all,
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I encountered a problem in our application. Maybe some of you can help me.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Using 
&lt;br&gt;&amp;gt; &amp;gt; - EclipseLink 1.1.3
&lt;br&gt;&amp;gt; &amp;gt; - Given a class A with a @Lob Field String stringValue;
&lt;br&gt;&amp;gt; &amp;gt; - Given class B with 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; @MapKey(name = &amp;quot;field&amp;quot;)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; private Map&amp;lt;AType, A&amp;gt; As;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; When I call As.containsKey(someAType) on the lazy loaded map 
&lt;br&gt;&amp;gt; &amp;gt; Then a Query with a DISTINCT is created.
&lt;br&gt;&amp;gt; &amp;gt; SELECT DISTINCT ...,t0.stringValue,...
&lt;br&gt;&amp;gt; &amp;gt; this leads to the following exception on oracle databases (and we made a
&lt;br&gt;&amp;gt; &amp;gt; test with DB2 and it also fails)
&lt;br&gt;&amp;gt; &amp;gt; ORA-00932: inconsistent datatypes: expected - got CLOB
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; This is because DISTINCT queries are not allowed on BLOB or CLOB fields. 
&lt;br&gt;&amp;gt; &amp;gt; Is this expected behavior?
&lt;br&gt;&amp;gt; &amp;gt; Did we miss a restriction of eclipselink? 
&lt;br&gt;&amp;gt; &amp;gt; Is there a way to not generate the query without DISTINCT?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; In toplink we never had this problem, so it seems that toplink did not
&lt;br&gt;&amp;gt; &amp;gt; generate the DISTINCT.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Here is the Stack Trace.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; regards,
&lt;br&gt;&amp;gt; &amp;gt; Hans
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.exceptions.DatabaseException: Internal Exception:
&lt;br&gt;&amp;gt; &amp;gt; java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got
&lt;br&gt;&amp;gt; &amp;gt; CLOB Error Code: 932 Call: SELECT DISTINCT t1.ID, t1.EXPLICITVERSION,
&lt;br&gt;&amp;gt; &amp;gt; t1.STRINGVALUE, t1.UUID, .....
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:332) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:667) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:512) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:536) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:599) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2518) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2476) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:481) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:928) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:889) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:458) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2244) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1165) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.mappings.ManyToManyMapping.extractResultFromBatchQuery(ManyToManyMapping.java:231) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.indirection.BatchValueHolder.instantiate(BatchValueHolder.java:58) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:71) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:161) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:230) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.indirection.IndirectMap.buildDelegate(IndirectMap.java:110) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.indirection.IndirectMap.getDelegate(IndirectMap.java:316) 
&lt;br&gt;&amp;gt; &amp;gt; org.eclipse.persistence.indirection.IndirectMap.containsKey(IndirectMap.java:165) 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; _____________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt; DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für 
&lt;br&gt;&amp;gt; &amp;gt; 16,99 Euro/mtl.!* Hier klicken: &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://wiki.eclipse.org/User:James.sutherland.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/User:James.sutherland.oracle.com&lt;/a&gt;&amp;nbsp;James Sutherland 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.eclipse.org/eclipselink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eclipse.org/eclipselink/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;EclipseLink , &amp;nbsp;&lt;a href=&quot;http://www.oracle.com/technology/products/ias/toplink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com/technology/products/ias/toplink/&lt;/a&gt;&lt;br&gt;&amp;gt; TopLink 
&lt;br&gt;&amp;gt; Wiki: &amp;nbsp;&lt;a href=&quot;http://wiki.eclipse.org/EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/EclipseLink&lt;/a&gt;&amp;nbsp;EclipseLink , 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://wiki.oracle.com/page/TopLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.oracle.com/page/TopLink&lt;/a&gt;&amp;nbsp;TopLink 
&lt;br&gt;&amp;gt; Forums: &amp;nbsp;&lt;a href=&quot;http://forums.oracle.com/forums/forum.jspa?forumID=48&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.oracle.com/forums/forum.jspa?forumID=48&lt;/a&gt;&amp;nbsp;TopLink , 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/EclipseLink-f26430.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/EclipseLink-f26430.html&lt;/a&gt;&amp;nbsp;EclipseLink 
&lt;br&gt;&amp;gt; Book: &amp;nbsp;&lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikibooks.org/wiki/Java_Persistence&lt;/a&gt;&amp;nbsp;Java Persistence 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/IndirectMap.containsKey-leads-to-Exception-because-DISTINCT-on-%40Lob-Field-tp26390360p26395252.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/IndirectMap.containsKey-leads-to-Exception-because-DISTINCT-on-%40Lob-Field-tp26390360p26395252.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the EclipseLink - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26405407&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_____________________________________________________________
&lt;br&gt;DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für 
&lt;br&gt;16,99 Euro/mtl.!* Hier klicken: &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26405407&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndirectMap.containsKey-leads-to-Exception-because-DISTINCT-on-%40Lob-Field-tp26390360p26405407.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26399269</id>
	<title>EclipseLink 1.1.3: object persisted is not considered registered at commit time</title>
	<published>2009-11-17T14:51:21Z</published>
	<updated>2009-11-17T14:51:21Z</updated>
	<author>
		<name>Mike Kienenberger</name>
	</author>
	<content type="html">I am using the EclipseLink 1.1.3, specifically the
&lt;br&gt;eclipselink-1.1.3.v20091002-r5404.zip distribution.
&lt;br&gt;&lt;br&gt;I have a disconnected set of new and existing objects that I want to
&lt;br&gt;reattach to a clear()ed persistence manager via persist() or merge()
&lt;br&gt;as appropriate, and then commit(). &amp;nbsp;Basically, we have our own simple
&lt;br&gt;JPA-API-based unit of work implementation which tracks changes to
&lt;br&gt;disconnected objects and then reattaches and commits those objects at
&lt;br&gt;an commit time.
&lt;br&gt;&lt;br&gt;This methodology has worked fine in the past for similar situations,
&lt;br&gt;but today I'm hitting a problem where a new object which was
&lt;br&gt;persist()ed is being flagged as unpersisted in
&lt;br&gt;discoverAndPersistUnregisteredNewObjects() during commit().
&lt;br&gt;&lt;br&gt;java.lang.IllegalStateException: During synchronization a new object
&lt;br&gt;was found through a relationship that was not marked cascade PERSIST:
&lt;br&gt;[toString() representation of my entity].
&lt;br&gt;&lt;br&gt;Thread [btpool0-3] (Suspended (exception IllegalStateException))	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork(UnitOfWorkImpl).discoverAndPersistUnregisteredNewObjects(Object,
&lt;br&gt;boolean, Map, Map, Map) line: 4010
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OneToOneMapping(ObjectReferenceMapping).cascadeDiscoverAndPersistUnregisteredNewObjects(Object,
&lt;br&gt;Map, Map, Map, UnitOfWorkImpl) line: 743
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObjectBuilder.cascadeDiscoverAndPersistUnregisteredNewObjects(Object,
&lt;br&gt;Map, Map, Map, UnitOfWorkImpl) line: 1511
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork(UnitOfWorkImpl).discoverAndPersistUnregisteredNewObjects(Object,
&lt;br&gt;boolean, Map, Map, Map) line: 4013
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork.discoverUnregisteredNewObjects(Map, Map,
&lt;br&gt;Map, Map) line: 206
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork(UnitOfWorkImpl).calculateChanges(Map,
&lt;br&gt;UnitOfWorkChangeSet, boolean) line: 628
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWithChangeSet(boolean)
&lt;br&gt;line: 1387
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork.commitRootUnitOfWork() line: 181	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitAndResume() line: 1060	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EntityTransactionImpl.commitInternal() line: 84	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EntityTransactionImpl.commit() line: 63	
&lt;br&gt;&lt;br&gt;This is the behavior I am seeing. &amp;nbsp;When I call persist() with this
&lt;br&gt;specific object instance and trace through the code to
&lt;br&gt;RepeatableWriteUnitOfWork(UnitOfWorkImpl).checkIfAlreadyRegistered, I
&lt;br&gt;see that a copy of the object is already considered registered,
&lt;br&gt;although not the specific instance I'm working with. &amp;nbsp;[id instance
&lt;br&gt;values shown from the eclipse debugger]
&lt;br&gt;&lt;br&gt;Argument:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataEntity = com.gvea.applications.cis.entity.jpa.JpaReceiptSource &amp;nbsp;(id=2510)	
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork(UnitOfWorkImpl).checkIfAlreadyRegistered(Object,
&lt;br&gt;ClassDescriptor) line: 765
&lt;br&gt;&amp;nbsp; &amp;nbsp; RepeatableWriteUnitOfWork(UnitOfWorkImpl).registerNewObjectForPersist(Object,
&lt;br&gt;Map) line: 4039
&lt;br&gt;&amp;nbsp; &amp;nbsp; EntityManagerImpl.persist(Object) line: 255	
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (hasNewObjects()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; registeredObject = getNewObjectsOriginalToClone().get(object);
&lt;br&gt;&lt;br&gt;Values after checking getNewObjectsOriginalToClone() map:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; this = org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork
&lt;br&gt;&amp;nbsp;(id=2859)
&lt;br&gt;&amp;nbsp; &amp;nbsp; object = com.gvea.applications.cis.entity.jpa.JpaReceiptSource &amp;nbsp;(id=2510)	
&lt;br&gt;&amp;nbsp; &amp;nbsp; registeredObject =
&lt;br&gt;com.gvea.applications.cis.entity.jpa.JpaReceiptSource &amp;nbsp;(id=2868)
&lt;br&gt;&lt;br&gt;As you can see, the copy (id=2868) is detected as registered, not the
&lt;br&gt;original object being persisted.
&lt;br&gt;&lt;br&gt;But then when I go to commit(), I get the above IllegalStateException
&lt;br&gt;for (id=2510) since the code appears to only check getCloneMapping()
&lt;br&gt;and not getNewObjectsOriginalToClone() like the persist method does.
&lt;br&gt;[stack trace above]
&lt;br&gt;&lt;br&gt;if (!isObjectRegistered(object)) {
&lt;br&gt;[...]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // It is new but not referenced by a cascade persist
&lt;br&gt;mapping, throw an error.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new
&lt;br&gt;IllegalStateException(ExceptionLocalization.buildMessage(&amp;quot;new_object_found_during_commit&amp;quot;,
&lt;br&gt;new Object[]{object}));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;this = org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork
&lt;br&gt;&amp;nbsp;(id=2859)
&lt;br&gt;object = com.gvea.applications.cis.entity.jpa.JpaReceiptSource &amp;nbsp;(id=2510)
&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26399269&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/EclipseLink-1.1.3%3A-object-persisted-is-not-considered-registered-at-commit-time-tp26399269p26399269.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26396474</id>
	<title>Re: how can I reference a foreign key in ejbql where condition?</title>
	<published>2009-11-17T13:11:42Z</published>
	<updated>2009-11-17T13:11:42Z</updated>
	<author>
		<name>zamek42</name>
	</author>
	<content type="html">Hi James,
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;James Sutherland wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Why are you using a ReadAllQuery, if you are using JPA and JPQL? &amp;nbsp;Just create a JPA Query,
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Yes, it works well. Thx a lot
&lt;br&gt;&lt;br&gt;Zamek</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-can-I-reference-a-foreign-key-in-ejbql-where-condition--tp26263446p26396474.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26395252</id>
	<title>Re: IndirectMap.containsKey leads to Exception because DISTINCT on @Lob-Field</title>
	<published>2009-11-17T10:41:50Z</published>
	<updated>2009-11-17T10:41:50Z</updated>
	<author>
		<name>James Sutherland</name>
	</author>
	<content type="html">The distinct is used because you are using batch reading on the query. &amp;nbsp;If you do not set batch reading on the query then you will not have the issue. &amp;nbsp;Batch reading uses a distinct to avoid fetching duplicate data. &amp;nbsp;You can disable the usage of the distinct by setting dontUseDistinct() on the original batch query. &amp;nbsp;But then you will be selecting duplicate potentially.
&lt;br&gt;&lt;br&gt;You could also try moving the Lob to another table, or use a fetch group (LAZY) on the Lob to avoid selecting it by default.
&lt;br&gt;&lt;br&gt;We could probably try to auto-detect a Lob field in the descriptor and not add the distinct, so you could log a bug for that.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Hans Harz-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi all,
&lt;br&gt;&lt;br&gt;I encountered a problem in our application. Maybe some of you can help me.
&lt;br&gt;&lt;br&gt;Using 
&lt;br&gt;- EclipseLink 1.1.3
&lt;br&gt;- Given a class A with a @Lob Field String stringValue;
&lt;br&gt;- Given class B with 
&lt;br&gt;&amp;nbsp; &amp;nbsp; @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
&lt;br&gt;&amp;nbsp; &amp;nbsp; @MapKey(name = &amp;quot;field&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; private Map&amp;lt;AType, A&amp;gt; As;
&lt;br&gt;&lt;br&gt;When I call As.containsKey(someAType) on the lazy loaded map 
&lt;br&gt;Then a Query with a DISTINCT is created.
&lt;br&gt;SELECT DISTINCT ...,t0.stringValue,...
&lt;br&gt;this leads to the following exception on oracle databases (and we made a test with DB2 and it also fails)
&lt;br&gt;ORA-00932: inconsistent datatypes: expected - got CLOB
&lt;br&gt;&lt;br&gt;This is because DISTINCT queries are not allowed on BLOB or CLOB fields. 
&lt;br&gt;Is this expected behavior?
&lt;br&gt;Did we miss a restriction of eclipselink? 
&lt;br&gt;Is there a way to not generate the query without DISTINCT?
&lt;br&gt;&lt;br&gt;In toplink we never had this problem, so it seems that toplink did not generate the DISTINCT.
&lt;br&gt;&lt;br&gt;Here is the Stack Trace.
&lt;br&gt;&lt;br&gt;regards,
&lt;br&gt;Hans
&lt;br&gt;&lt;br&gt;org.eclipse.persistence.exceptions.DatabaseException: Internal Exception: java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got CLOB Error Code: 932 Call: SELECT DISTINCT t1.ID, t1.EXPLICITVERSION, t1.STRINGVALUE, t1.UUID, .....
&lt;br&gt;org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:332) 
&lt;br&gt;org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:667) 
&lt;br&gt;org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:512) 
&lt;br&gt;org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:536) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:599) 
&lt;br&gt;org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2518) 
&lt;br&gt;org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2476) 
&lt;br&gt;org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:481) 
&lt;br&gt;org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:928) 
&lt;br&gt;org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664) 
&lt;br&gt;org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:889) 
&lt;br&gt;org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:458) 
&lt;br&gt;org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2244) 
&lt;br&gt;org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181) 
&lt;br&gt;org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1165) 
&lt;br&gt;org.eclipse.persistence.mappings.ManyToManyMapping.extractResultFromBatchQuery(ManyToManyMapping.java:231) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.BatchValueHolder.instantiate(BatchValueHolder.java:58) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:71) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:161) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:230) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;org.eclipse.persistence.indirection.IndirectMap.buildDelegate(IndirectMap.java:110) 
&lt;br&gt;org.eclipse.persistence.indirection.IndirectMap.getDelegate(IndirectMap.java:316) 
&lt;br&gt;org.eclipse.persistence.indirection.IndirectMap.containsKey(IndirectMap.java:165) 
&lt;br&gt;&lt;br&gt;_____________________________________________________________
&lt;br&gt;DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für 
&lt;br&gt;16,99 Euro/mtl.!* Hier klicken: &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;div class=&quot;signature&quot;&gt;&lt;a href=&quot;http://wiki.eclipse.org/User:James.sutherland.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;James Sutherland&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.eclipse.org/eclipselink/
&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;EclipseLink&lt;/a&gt;, &lt;a href=&quot;http://www.oracle.com/technology/products/ias/toplink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;&lt;br&gt;Wiki: &lt;a href=&quot;http://wiki.eclipse.org/EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;EclipseLink&lt;/a&gt;, &lt;a href=&quot;http://wiki.oracle.com/page/TopLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;&lt;br&gt;Forums: &lt;a href=&quot;http://forums.oracle.com/forums/forum.jspa?forumID=48&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;, &lt;a href=&quot;http://www.nabble.com/EclipseLink-f26430.html&quot; target=&quot;_top&quot;&gt;EclipseLink&lt;/a&gt;&lt;br&gt;Book: &lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Java Persistence&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndirectMap.containsKey-leads-to-Exception-because-DISTINCT-on-%40Lob-Field-tp26390360p26395252.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26394170</id>
	<title>Re: IndirectMap.containsKey leads to Exception because DISTINCT, on @Lob-Field (Reinhard Girstenbrei)</title>
	<published>2009-11-17T09:34:37Z</published>
	<updated>2009-11-17T09:34:37Z</updated>
	<author>
		<name>Reinhard Girstenbrei</name>
	</author>
	<content type="html">Hi Hans,
&lt;br&gt;Oracle Database Server does not allow to use the DISTINCT clause if 
&lt;br&gt;there is a select list item of data type LOB.
&lt;br&gt;You are using the batch reading which generates queries including a 
&lt;br&gt;DISTINCT clause.
&lt;br&gt;Now, as you have an attributed mapped to a LOB you run into this problem.
&lt;br&gt;Your can resolve this problem by not using batch reading.
&lt;br&gt;&lt;br&gt;If you have access to &amp;quot;My Oracle Support&amp;quot; (formerly known as Metalink) 
&lt;br&gt;you have access to the following enhancement request:
&lt;br&gt;&lt;br&gt;Bug 6646443 - ALLOW *BATCH* *READING* OF *LOB* COLUMNS IN ONETOMANY AND 
&lt;br&gt;MANYTOMANY RELATIONSHIPS
&lt;br&gt;&lt;br&gt;I have not found an enhancement request for such feature on bugzilla yet.
&lt;br&gt;&lt;br&gt;You can open a new SR if you have a valid support contract to vote for 
&lt;br&gt;this enhancement request or open an enhancement request at bugzilla.
&lt;br&gt;&lt;a href=&quot;https://bugs.eclipse.org/bugs/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://bugs.eclipse.org/bugs/&lt;/a&gt;&lt;br&gt;Classification: RT
&lt;br&gt;Product: EclipseLink
&lt;br&gt;Component: Foundation
&lt;br&gt;&lt;br&gt;Greetings,
&lt;br&gt;Reinhard
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users-request@...&lt;/a&gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Send eclipselink-users mailing list submissions to
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; To subscribe or unsubscribe via the World Wide Web, visit
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt; or, via email, send a message with subject or body 'help' to
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users-request@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You can reach the person managing the list at
&lt;br&gt;&amp;gt; 	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users-owner@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When replying, please edit your Subject line so it is more specific
&lt;br&gt;&amp;gt; than &amp;quot;Re: Contents of eclipselink-users digest...&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Today's Topics:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;1. Postgres arrays (Mike Traum)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;2. Re: Postgres arrays (Mike Traum)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;3. ReadAllQuery fetch all (Martin Janda)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;4. IndirectMap.containsKey leads to Exception because DISTINCT
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; on @Lob-Field (Hans Harz)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;5. Re: ReadAllQuery fetch all (Tom Ware)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;6. Re: how can I reference a foreign key in ejbql	where
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; condition? (James Sutherland)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;7. Re: How eclipselink handles Sequences? (James Sutherland)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 1
&lt;br&gt;&amp;gt; Date: Mon, 16 Nov 2009 09:31:00 -0800
&lt;br&gt;&amp;gt; From: Mike Traum &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mike.Traum@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: [eclipselink-users] Postgres arrays
&lt;br&gt;&amp;gt; To: EclipseLink User Discussions &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;4B018C54.502@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain; charset=ISO-8859-1; format=flowed
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; I'm trying to get a mapping for postgres arrays working. I'm using a 
&lt;br&gt;&amp;gt; Converter and thus far (without a lot of testing), inserting an array 
&lt;br&gt;&amp;gt; seems to work fine. But, when reading that array, eclipselink (1.2) 
&lt;br&gt;&amp;gt; throws the following exception before we even get to the Converter:
&lt;br&gt;&amp;gt; java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.Object;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor.buildArrayObjectFromArray(ObjectRelationalDataTypeDescriptor.java:326)
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The problem seems to be that eclipselink is attempting to cast 
&lt;br&gt;&amp;gt; java.sql.Array.getArray() to Object[], but postgres returns an array of 
&lt;br&gt;&amp;gt; primitives. This seems like an eclipselink bug, no? Any idea for a 
&lt;br&gt;&amp;gt; workaround?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 2
&lt;br&gt;&amp;gt; Date: Mon, 16 Nov 2009 13:30:31 -0800
&lt;br&gt;&amp;gt; From: Mike Traum &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mike.Traum@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: [eclipselink-users] Re: Postgres arrays
&lt;br&gt;&amp;gt; To: EclipseLink User Discussions &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;4B01C477.1090207@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain; charset=ISO-8859-1; format=flowed
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I seem to have worked out my issues. I upgraded the jdbc driver from 
&lt;br&gt;&amp;gt; postgresql-8.2-506.jdbc3.jar to postgresql-8.4-701.jdbc4.jar and 
&lt;br&gt;&amp;gt; postgres now returns the boxed types instead of the primitive arrays.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Mike Traum wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt; I'm trying to get a mapping for postgres arrays working. I'm using a 
&lt;br&gt;&amp;gt;&amp;gt; Converter and thus far (without a lot of testing), inserting an array 
&lt;br&gt;&amp;gt;&amp;gt; seems to work fine. But, when reading that array, eclipselink (1.2) 
&lt;br&gt;&amp;gt;&amp;gt; throws the following exception before we even get to the Converter:
&lt;br&gt;&amp;gt;&amp;gt; java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.Object;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;at 
&lt;br&gt;&amp;gt;&amp;gt; org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor.buildArrayObjectFromArray(ObjectRelationalDataTypeDescriptor.java:326) 
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The problem seems to be that eclipselink is attempting to cast 
&lt;br&gt;&amp;gt;&amp;gt; java.sql.Array.getArray() to Object[], but postgres returns an array 
&lt;br&gt;&amp;gt;&amp;gt; of primitives. This seems like an eclipselink bug, no? Any idea for a 
&lt;br&gt;&amp;gt;&amp;gt; workaround?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 3
&lt;br&gt;&amp;gt; Date: Mon, 16 Nov 2009 23:02:08 +0100
&lt;br&gt;&amp;gt; From: Martin Janda &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jandam@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: [eclipselink-users] ReadAllQuery fetch all
&lt;br&gt;&amp;gt; To: EclipseLink Users &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;5B79C16E-9C64-4786-B33B-4A5CD86B6E61@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain;	charset=us-ascii;	format=flowed;	delsp=yes
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;can you help me? please. I have Entity with lazy mappings. I need &amp;nbsp;
&lt;br&gt;&amp;gt; to read all Entity attributes Eager&amp;Lazy trough ReadAllQuery &amp;nbsp;
&lt;br&gt;&amp;gt; (ScrollableCursor) and detach them. I need to use Entities after &amp;nbsp;
&lt;br&gt;&amp;gt; closing EM and EMF. So they can no longer fetch lazy mappings.
&lt;br&gt;&amp;gt; I need to work with selected Entities from JTable (needs lazy) in &amp;nbsp;
&lt;br&gt;&amp;gt; another context (needs all attributes including lazy mappings).
&lt;br&gt;&amp;gt; Is there any way how to do it in EclipseLink 1.1.3 Java SE, I prefer &amp;nbsp;
&lt;br&gt;&amp;gt; annotations or direct methods in EM/EMF/UOW.
&lt;br&gt;&amp;gt; Thank you very much.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Martin
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; PS Sorry for my english
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 4
&lt;br&gt;&amp;gt; Date: Tue, 17 Nov 2009 14:58:09 +0100
&lt;br&gt;&amp;gt; From: Hans Harz &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hansharz_eclipselink@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: [eclipselink-users] IndirectMap.containsKey leads to
&lt;br&gt;&amp;gt; 	Exception because DISTINCT on @Lob-Field
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;1852227376@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain; charset=iso-8859-15
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I encountered a problem in our application. Maybe some of you can help me.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using 
&lt;br&gt;&amp;gt; - EclipseLink 1.1.3
&lt;br&gt;&amp;gt; - Given a class A with a @Lob Field String stringValue;
&lt;br&gt;&amp;gt; - Given class B with 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; @MapKey(name = &amp;quot;field&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; private Map&amp;lt;AType, A&amp;gt; As;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When I call As.containsKey(someAType) on the lazy loaded map 
&lt;br&gt;&amp;gt; Then a Query with a DISTINCT is created.
&lt;br&gt;&amp;gt; SELECT DISTINCT ...,t0.stringValue,...
&lt;br&gt;&amp;gt; this leads to the following exception on oracle databases (and we made a test with DB2 and it also fails)
&lt;br&gt;&amp;gt; ORA-00932: inconsistent datatypes: expected - got CLOB
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is because DISTINCT queries are not allowed on BLOB or CLOB fields. 
&lt;br&gt;&amp;gt; Is this expected behavior?
&lt;br&gt;&amp;gt; Did we miss a restriction of eclipselink? 
&lt;br&gt;&amp;gt; Is there a way to not generate the query without DISTINCT?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In toplink we never had this problem, so it seems that toplink did not generate the DISTINCT.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here is the Stack Trace.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; regards,
&lt;br&gt;&amp;gt; Hans
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; org.eclipse.persistence.exceptions.DatabaseException: Internal Exception: java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got CLOB Error Code: 932 Call: SELECT DISTINCT t1.ID, t1.EXPLICITVERSION, t1.STRINGVALUE, t1.UUID, .....
&lt;br&gt;&amp;gt; org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:332) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:667) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:512) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:536) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:599) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2518) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2476) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:481) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:928) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:889) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:458) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2244) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1165) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.mappings.ManyToManyMapping.extractResultFromBatchQuery(ManyToManyMapping.java:231) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.indirection.BatchValueHolder.instantiate(BatchValueHolder.java:58) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:71) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:161) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:230) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.indirection.IndirectMap.buildDelegate(IndirectMap.java:110) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.indirection.IndirectMap.getDelegate(IndirectMap.java:316) 
&lt;br&gt;&amp;gt; org.eclipse.persistence.indirection.IndirectMap.containsKey(IndirectMap.java:165) 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _____________________________________________________________
&lt;br&gt;&amp;gt; DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für 
&lt;br&gt;&amp;gt; 16,99 Euro/mtl.!* Hier klicken: &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 5
&lt;br&gt;&amp;gt; Date: Tue, 17 Nov 2009 09:09:44 -0500
&lt;br&gt;&amp;gt; From: Tom Ware &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tom.ware@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: [eclipselink-users] ReadAllQuery fetch all
&lt;br&gt;&amp;gt; To: EclipseLink User Discussions &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;4B02AEA8.5020103@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain; charset=ISO-8859-1; format=flowed
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi Martin,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;If you are using JPQL, JPQL allows you to specify fetch joins that will cause 
&lt;br&gt;&amp;gt; relationships to be automatically loaded. &amp;nbsp;Have you tried that?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;If you are using EclipseLink expressions, there is an addJoinedAttribute 
&lt;br&gt;&amp;gt; method you can use on your query.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Tom
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Martin Janda wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; can you help me? please. I have Entity with lazy mappings. I need to 
&lt;br&gt;&amp;gt;&amp;gt; read all Entity attributes Eager&amp;Lazy trough ReadAllQuery 
&lt;br&gt;&amp;gt;&amp;gt; (ScrollableCursor) and detach them. I need to use Entities after closing 
&lt;br&gt;&amp;gt;&amp;gt; EM and EMF. So they can no longer fetch lazy mappings.
&lt;br&gt;&amp;gt;&amp;gt; I need to work with selected Entities from JTable (needs lazy) in 
&lt;br&gt;&amp;gt;&amp;gt; another context (needs all attributes including lazy mappings).
&lt;br&gt;&amp;gt;&amp;gt; Is there any way how to do it in EclipseLink 1.1.3 Java SE, I prefer 
&lt;br&gt;&amp;gt;&amp;gt; annotations or direct methods in EM/EMF/UOW.
&lt;br&gt;&amp;gt;&amp;gt; Thank you very much.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;Martin
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; PS Sorry for my english
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Message: 6
&lt;br&gt;&amp;gt; Date: Tue, 17 Nov 2009 06:38:39 -0800 (PST)
&lt;br&gt;&amp;gt; From: James Sutherland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jamesssss@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: [eclipselink-users] how can I reference a foreign key in
&lt;br&gt;&amp;gt; 	ejbql	where condition?
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;26391063.post@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Content-Type: text/plain; charset=us-ascii
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Why are you using a ReadAllQuery, if you are using JPA and JPQL? &amp;nbsp;Just create
&lt;br&gt;&amp;gt; a JPA Query,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Query query = em.createQuery(&amp;quot;Select Object(entity) from ChairImpl entity
&lt;br&gt;&amp;gt; where &amp;nbsp;entity.institute=:institute&amp;quot;);
&lt;br&gt;&amp;gt; query.setParameter(&amp;quot;institute&amp;quot;, new Integer(10));
&lt;br&gt;&amp;gt; List result = query.getResultList();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you need to use a ReadAllQuery with EJBQL then you cannot use
&lt;br&gt;&amp;gt; addArgumentValue(), as it seems to have issues, you will need to execute it
&lt;br&gt;&amp;gt; as a parametrized query.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i.e.
&lt;br&gt;&amp;gt; ReadAllQuery query = new ReadAllQuery(ChairImpl.getClass());
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;query.setEJBQLString(&amp;quot;Select Object(entity) from ChairImpl entity where 
&lt;br&gt;&amp;gt; entity.institute=?1&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;EntityManager em = this.getEntityManager();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Query query = JpaHelper.createQuery(query, em);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;query.setParameter(&amp;quot;1&amp;quot;, new Integer(10));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;List result = query.getResultList();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; zamek42 wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; hello James, 
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; thx for response.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; James Sutherland wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Are you using JPA? &amp;nbsp;EJBQL/JPQL is normally used from JPA using the JPA
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Query interface.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For using EJBQL/JPQL with an EclipseLink ReadAllQuery you need to set the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; argument names and values.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; i.e.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; query.setEJBQLString(&amp;quot;Select OBJECT(sg) from sg sg where sg.foreignField
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; = ?1&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; query.addArgumentValue(id);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I get filter criteria from smartgwt, which is a gwt frontend. I need ejbql
&lt;br&gt;&amp;gt;&amp;gt; because it sends filtering criterias in a Map&amp;lt;String,String&amp;gt;. I don't want
&lt;br&gt;&amp;gt;&amp;gt; to use an unecessary string parser, simply put criteria text into the sql.
&lt;br&gt;&amp;gt;&amp;gt; For a test I make a simple query:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;ReadAllQuery query = new ReadAllQuery(ChairImpl.getClass());
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;query.setEJBQLString(&amp;quot;Select Object(entity) from ChairImpl entity where 
&lt;br&gt;&amp;gt;&amp;gt; entity.institute=?1&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;query.addArgumentValue(new Integer(10));
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;EntityManager em = this.getEntityManager();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;List result = JpaHelper.createQuery(query, em).getResultList();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; this throws an error:
&lt;br&gt;&amp;gt;&amp;gt; java.lang.IllegalStateException: Query argument 1 not found in the list of
&lt;br&gt;&amp;gt;&amp;gt; parameters provided during query execution.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ChairImpl has an attribute named institute:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;@ManyToOne
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; @JoinColumn(nullable=false)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public InstituteImpl getInstitute() {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return institute;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public void setInstitute(InstituteImpl institute) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.institute = institute;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What do I mistake?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Perhaps JpaHelper.createQuery is unecessary? How can I use readAllQuery
&lt;br&gt;&amp;gt;&amp;gt; from glassfish directly?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; thx 
&lt;br&gt;&amp;gt;&amp;gt; Zamek
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -----
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://wiki.eclipse.org/User:James.sutherland.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/User:James.sutherland.oracle.com&lt;/a&gt;&amp;nbsp;James Sutherland 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.eclipse.org/eclipselink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eclipse.org/eclipselink/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;EclipseLink , &amp;nbsp;&lt;a href=&quot;http://www.oracle.com/technology/products/ias/toplink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com/technology/products/ias/toplink/&lt;/a&gt;&lt;br&gt;&amp;gt; TopLink 
&lt;br&gt;&amp;gt; Wiki: &amp;nbsp;&lt;a href=&quot;http://wiki.eclipse.org/EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/EclipseLink&lt;/a&gt;&amp;nbsp;EclipseLink , 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://wiki.oracle.com/page/TopLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.oracle.com/page/TopLink&lt;/a&gt;&amp;nbsp;TopLink 
&lt;br&gt;&amp;gt; Forums: &amp;nbsp;&lt;a href=&quot;http://forums.oracle.com/forums/forum.jspa?forumID=48&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.oracle.com/forums/forum.jspa?forumID=48&lt;/a&gt;&amp;nbsp;TopLink , 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/EclipseLink-f26430.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/EclipseLink-f26430.html&lt;/a&gt;&amp;nbsp;EclipseLink 
&lt;br&gt;&amp;gt; Book: &amp;nbsp;&lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikibooks.org/wiki/Java_Persistence&lt;/a&gt;&amp;nbsp;Java Persistence 
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Oracle &amp;lt;&lt;a href=&quot;http://www.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com&lt;/a&gt;&amp;gt;
&lt;br&gt;Reinhard Girstenbrei | Senior Principal Technical Support Engineer
&lt;br&gt;Phone: +498914302318 | Mobile: +491775941318
&lt;br&gt;Oracle Oracle Customer Service
&lt;br&gt;&lt;br&gt;ORACLE Deutschland GmbH | Riesstr. 25 | 80992 München
&lt;br&gt;&lt;br&gt;ORACLE Deutschland GmbH, Hauptverwaltung: Riesstraße 25, D-80992 München
&lt;br&gt;Geschäftsführer: Jürgen Kunz, Registergericht: Amtsgericht München, HRB 
&lt;br&gt;82775
&lt;br&gt;Green Oracle &amp;lt;&lt;a href=&quot;http://www.oracle.com/commitment&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com/commitment&lt;/a&gt;&amp;gt; 	Oracle is committed to 
&lt;br&gt;developing practices and products that help protect the environment
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394170&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-IndirectMap.containsKey-leads-to-Exception-because-DISTINCT%2C-on-%40Lob-Field-%28Reinhard-Girstenbrei%29-tp26394170p26394170.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26391807</id>
	<title>Re: How eclipselink handles Sequences?</title>
	<published>2009-11-17T07:27:24Z</published>
	<updated>2009-11-17T07:27:24Z</updated>
	<author>
		<name>James Sutherland</name>
	</author>
	<content type="html">Doesn't sound correct, the preallocation size must match the increment. &amp;nbsp;But if it works for you, then fine.
&lt;br&gt;&lt;br&gt;As for runnning out of sequence numbers see,
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence/Identity_and_Sequencing#Running_Out_of_Numbers&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikibooks.org/wiki/Java_Persistence/Identity_and_Sequencing#Running_Out_of_Numbers&lt;/a&gt;&lt;br&gt;&lt;br&gt;The difference of 1 vs 50 should not effect running out, either you would run out anyway, or more likely it is the difference between 100 millions years and 20 millions years...
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;saasira wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi James,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; I think I found a solution to my problem...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Here is what I did:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Database:Postgres
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Application Server: Glassfish V2.1
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Database Sequence: Increment=1,Cache=100
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sequence Pre Allocation Size Annotation on Entity=100
&lt;br&gt;&lt;br&gt;&amp;nbsp; I tried with parallelly/simultaneously populating the data with three
&lt;br&gt;different applications: eclipselink based application,pgAdmin, psql (command
&lt;br&gt;line shell for postgres); I'm happy to say that everything worked fine with
&lt;br&gt;out any collisions &amp;nbsp;and no gaps in numbers generated by the sequence. Of
&lt;br&gt;course, if any of the client has fetched a set of numbers(specified by the
&lt;br&gt;Cache size) and closed the connection before completely using up the set of
&lt;br&gt;numbers fetched, then there will be unused ids. However, we can eliminate
&lt;br&gt;this by reducing the cache size to 50 or 25, based on our needs.
&lt;br&gt;&lt;br&gt;So, the solution is not to synchronize allocation size with sequence
&lt;br&gt;increment value but to sysnchronize the allocation size with Cache size of
&lt;br&gt;the sequence.
&lt;br&gt;In this way, we can eliminate the collision of numbers as well as reduce the
&lt;br&gt;gaps that may be produced in case of Increment_Value Vs allocationSize
&lt;br&gt;sync..
&lt;br&gt;If you find any issues with this approach, can you please explain those?
&lt;br&gt;&lt;br&gt;Thanks and Regards,
&lt;br&gt;Samba
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Wed, Nov 11, 2009 at 1:28 PM, Samba &amp;lt;saasira@gmail.com&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi James,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Thanks for your response.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a need where the same database is used by three different
&lt;br&gt;&amp;gt; applications: eclipselink , JDBC(legacy), and stored procedures which are
&lt;br&gt;&amp;gt; used mainly during bulk operations and upgrade scenarios.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In such a scenario, I cannot have that luxury of unused id values, as there
&lt;br&gt;&amp;gt; will be too many over a period of time and the sequence soon
&lt;br&gt;&amp;gt; becomes exhausted; may be I'm exaggerating when I say that this may happen
&lt;br&gt;&amp;gt; soon but nevertheless, there will be 50 times lesser available ids, provided
&lt;br&gt;&amp;gt; allocation size is set at 50.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; By the way, I suppose that incrementing a sequence value will be DML and
&lt;br&gt;&amp;gt; not DDL, after all we are not altering the name of the sequence &amp;nbsp;or dropping
&lt;br&gt;&amp;gt; it, and databases are capable of handling concurrency.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In fact, eclipselink is behaving correctly in case of Table Sequences and
&lt;br&gt;&amp;gt; updating the SEQUIENCE_COUNT column by 50 when ever it prefetches id values
&lt;br&gt;&amp;gt; by that number.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So, why is this differential treatment in case of native Sequences?
&lt;br&gt;&amp;gt; shouldn't eclipselink increment the sequence value by 50 &amp;nbsp;as it does in case
&lt;br&gt;&amp;gt; of Table Sequence?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Nov 10, 2009 at 9:41 PM, James Sutherland &amp;lt;jamesssss@yahoo.com&amp;gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The purpose of sequence preallocation is to improve performance. &amp;nbsp;If you
&lt;br&gt;&amp;gt;&amp;gt; want
&lt;br&gt;&amp;gt;&amp;gt; your increment to be 1, then set your preallocation size to 1, and there
&lt;br&gt;&amp;gt;&amp;gt; will be no issues. &amp;nbsp;If you want to improve performance, then you need to
&lt;br&gt;&amp;gt;&amp;gt; set
&lt;br&gt;&amp;gt;&amp;gt; your increment to the preallocation size, if this is say 50, this will not
&lt;br&gt;&amp;gt;&amp;gt; cause any issues with the other application if it assumes it is 1, ids
&lt;br&gt;&amp;gt;&amp;gt; will
&lt;br&gt;&amp;gt;&amp;gt; not collide, you will have some unused ids, but that should not be an
&lt;br&gt;&amp;gt;&amp;gt; issue.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Changing DDL objects on the fly, is not a very good idea.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; saasira wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; This following is quoted from the eclipselink User Guide :
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;quot;The key difference between Oracle Type Sequencing process and the
&lt;br&gt;&amp;gt;&amp;gt; process
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; involved in table sequencing is that EclipseLink is unaware of the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; INCREMENTconstruct on the
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;&amp;gt; SEQUENCE object. EclipseLink sequencing and the Oracle SEQUENCE object
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; operate in isolation. To avoid sequencing errors in the application, set
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; EclipseLink preallocation size and the Oracle SEQUENCE object INCREMENT
&lt;br&gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the same value. Note that the Oracle sequence object must have a
&lt;br&gt;&amp;gt;&amp;gt; starting
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; value equal to the preallocation size because when EclipseLink gets the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; next
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; sequence value, it assume it has the previous preallocation size of
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; values.&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; We have a scenario where the database is updated not only by an eclipse
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; link
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; based application but by stored procedures as well. for that matter, I
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; believe that we cannot make an assumption that the eclipse link is
&lt;br&gt;&amp;gt;&amp;gt; owning
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the database and operates on it in isolation.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; So, if we use the increment value of the &amp;nbsp;sequence to the preallocation
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; size
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; defined on &amp;nbsp;the eclipse link entity definition, then there will be a lot
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp;sequence values unused.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; But if we set the increment value of the sequence to nominal 1, then
&lt;br&gt;&amp;gt;&amp;gt; there
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; is every chance of collision with the values generated by sequence and
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; that
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; generated by eclipse link.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Now my question is why can't the eclipse link update the sequence object
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; by
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the preallocation size when ever it want to prefetch values? why is it
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; updating only by the original increment size of the sequence even though
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; it
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; is presuming it acquired the amount o values mentioned in the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; preallocation
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; size in the entity?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; for example, had eclipse link done some thing like this:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; on Oracle:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; ALTER SEQUENCE SEQUENCE_NAME INCREMENT BY 'preallocation_size'; where
&lt;br&gt;&amp;gt;&amp;gt; ever
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; eclipse link wanted to prefetch the values
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; and then resetting it back to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; ALTER SEQUENCE SEQUENCE_NAME INCREMENT BY 'original_increment_value';
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; then there can be no error at any point , who ever may update the
&lt;br&gt;&amp;gt;&amp;gt; database
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; from any where as long as sequence is properly used.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Can this be achieved by any setting by which I can force elipselink to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; always update the sequence value by preallocation size and not the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; INCREMENT
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; SIZE?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Thanks and Regards,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Samba
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;div class=&quot;signature&quot;&gt;&lt;a href=&quot;http://wiki.eclipse.org/User:James.sutherland.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;James Sutherland&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.eclipse.org/eclipselink/
&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;EclipseLink&lt;/a&gt;, &lt;a href=&quot;http://www.oracle.com/technology/products/ias/toplink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;&lt;br&gt;Wiki: &lt;a href=&quot;http://wiki.eclipse.org/EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;EclipseLink&lt;/a&gt;, &lt;a href=&quot;http://wiki.oracle.com/page/TopLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;&lt;br&gt;Forums: &lt;a href=&quot;http://forums.oracle.com/forums/forum.jspa?forumID=48&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;, &lt;a href=&quot;http://www.nabble.com/EclipseLink-f26430.html&quot; target=&quot;_top&quot;&gt;EclipseLink&lt;/a&gt;&lt;br&gt;Book: &lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Java Persistence&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-eclipselink-handles-Sequences--tp26283654p26391807.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26391063</id>
	<title>Re: how can I reference a foreign key in ejbql where condition?</title>
	<published>2009-11-17T06:38:39Z</published>
	<updated>2009-11-17T06:38:39Z</updated>
	<author>
		<name>James Sutherland</name>
	</author>
	<content type="html">Why are you using a ReadAllQuery, if you are using JPA and JPQL? &amp;nbsp;Just create a JPA Query,
&lt;br&gt;&lt;br&gt;Query query = em.createQuery(&amp;quot;Select Object(entity) from ChairImpl entity where &amp;nbsp;entity.institute=:institute&amp;quot;);
&lt;br&gt;query.setParameter(&amp;quot;institute&amp;quot;, new Integer(10));
&lt;br&gt;List result = query.getResultList();
&lt;br&gt;&lt;br&gt;If you need to use a ReadAllQuery with EJBQL then you cannot use addArgumentValue(), as it seems to have issues, you will need to execute it as a parametrized query.
&lt;br&gt;&lt;br&gt;i.e.
&lt;br&gt;ReadAllQuery query = new ReadAllQuery(ChairImpl.getClass());
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.setEJBQLString(&amp;quot;Select Object(entity) from ChairImpl entity where &amp;nbsp;entity.institute=?1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;EntityManager em = this.getEntityManager();
&lt;br&gt;&amp;nbsp; &amp;nbsp;Query query = JpaHelper.createQuery(query, em);
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.setParameter(&amp;quot;1&amp;quot;, new Integer(10));
&lt;br&gt;&amp;nbsp; &amp;nbsp;List result = query.getResultList();
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;zamek42 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;hello James, 
&lt;br&gt;&lt;br&gt;thx for response.
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;James Sutherland wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Are you using JPA? &amp;nbsp;EJBQL/JPQL is normally used from JPA using the JPA Query interface.
&lt;br&gt;&lt;br&gt;For using EJBQL/JPQL with an EclipseLink ReadAllQuery you need to set the argument names and values.
&lt;br&gt;&lt;br&gt;i.e.
&lt;br&gt;query.setEJBQLString(&amp;quot;Select OBJECT(sg) from sg sg where sg.foreignField = ?1&amp;quot;);
&lt;br&gt;query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;query.addArgumentValue(id);
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
I get filter criteria from smartgwt, which is a gwt frontend. I need ejbql because it sends filtering criterias in a Map&amp;lt;String,String&amp;gt;. I don't want to use an unecessary string parser, simply put criteria text into the sql.
&lt;br&gt;For a test I make a simple query:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;ReadAllQuery query = new ReadAllQuery(ChairImpl.getClass());
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.setEJBQLString(&amp;quot;Select Object(entity) from ChairImpl entity where &amp;nbsp;entity.institute=?1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.addArgumentValue(new Integer(10));
&lt;br&gt;&amp;nbsp; &amp;nbsp;EntityManager em = this.getEntityManager();
&lt;br&gt;&amp;nbsp; &amp;nbsp;List result = JpaHelper.createQuery(query, em).getResultList();
&lt;br&gt;&lt;br&gt;this throws an error:
&lt;br&gt;java.lang.IllegalStateException: Query argument 1 not found in the list of parameters provided during query execution.
&lt;br&gt;&lt;br&gt;ChairImpl has an attribute named institute:
&lt;br&gt;&amp;nbsp; &amp;nbsp;@ManyToOne
&lt;br&gt;&amp;nbsp; &amp;nbsp; @JoinColumn(nullable=false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; public InstituteImpl getInstitute() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return institute;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void setInstitute(InstituteImpl institute) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.institute = institute;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;What do I mistake?
&lt;br&gt;&lt;br&gt;Perhaps JpaHelper.createQuery is unecessary? How can I use readAllQuery from glassfish directly?
&lt;br&gt;&lt;br&gt;thx 
&lt;br&gt;Zamek
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;div class=&quot;signature&quot;&gt;&lt;a href=&quot;http://wiki.eclipse.org/User:James.sutherland.oracle.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;James Sutherland&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.eclipse.org/eclipselink/
&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;EclipseLink&lt;/a&gt;, &lt;a href=&quot;http://www.oracle.com/technology/products/ias/toplink/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;&lt;br&gt;Wiki: &lt;a href=&quot;http://wiki.eclipse.org/EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;EclipseLink&lt;/a&gt;, &lt;a href=&quot;http://wiki.oracle.com/page/TopLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;&lt;br&gt;Forums: &lt;a href=&quot;http://forums.oracle.com/forums/forum.jspa?forumID=48&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;TopLink&lt;/a&gt;, &lt;a href=&quot;http://www.nabble.com/EclipseLink-f26430.html&quot; target=&quot;_top&quot;&gt;EclipseLink&lt;/a&gt;&lt;br&gt;Book: &lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Java Persistence&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-can-I-reference-a-foreign-key-in-ejbql-where-condition--tp26263446p26391063.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26390591</id>
	<title>Re: ReadAllQuery fetch all</title>
	<published>2009-11-17T06:09:44Z</published>
	<updated>2009-11-17T06:09:44Z</updated>
	<author>
		<name>tware</name>
	</author>
	<content type="html">Hi Martin,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;If you are using JPQL, JPQL allows you to specify fetch joins that will cause 
&lt;br&gt;relationships to be automatically loaded. &amp;nbsp;Have you tried that?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;If you are using EclipseLink expressions, there is an addJoinedAttribute 
&lt;br&gt;method you can use on your query.
&lt;br&gt;&lt;br&gt;-Tom
&lt;br&gt;&lt;br&gt;Martin Janda wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;nbsp; can you help me? please. I have Entity with lazy mappings. I need to 
&lt;br&gt;&amp;gt; read all Entity attributes Eager&amp;Lazy trough ReadAllQuery 
&lt;br&gt;&amp;gt; (ScrollableCursor) and detach them. I need to use Entities after closing 
&lt;br&gt;&amp;gt; EM and EMF. So they can no longer fetch lazy mappings.
&lt;br&gt;&amp;gt; I need to work with selected Entities from JTable (needs lazy) in 
&lt;br&gt;&amp;gt; another context (needs all attributes including lazy mappings).
&lt;br&gt;&amp;gt; Is there any way how to do it in EclipseLink 1.1.3 Java SE, I prefer 
&lt;br&gt;&amp;gt; annotations or direct methods in EM/EMF/UOW.
&lt;br&gt;&amp;gt; Thank you very much.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Martin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; PS Sorry for my english
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390591&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390591&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ReadAllQuery-fetch-all-tp26380381p26390591.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26390360</id>
	<title>IndirectMap.containsKey leads to Exception because DISTINCT on @Lob-Field</title>
	<published>2009-11-17T05:58:09Z</published>
	<updated>2009-11-17T05:58:09Z</updated>
	<author>
		<name>Hans Harz-2</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I encountered a problem in our application. Maybe some of you can help me.
&lt;br&gt;&lt;br&gt;Using 
&lt;br&gt;- EclipseLink 1.1.3
&lt;br&gt;- Given a class A with a @Lob Field String stringValue;
&lt;br&gt;- Given class B with 
&lt;br&gt;&amp;nbsp; &amp;nbsp; @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
&lt;br&gt;&amp;nbsp; &amp;nbsp; @MapKey(name = &amp;quot;field&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; private Map&amp;lt;AType, A&amp;gt; As;
&lt;br&gt;&lt;br&gt;When I call As.containsKey(someAType) on the lazy loaded map 
&lt;br&gt;Then a Query with a DISTINCT is created.
&lt;br&gt;SELECT DISTINCT ...,t0.stringValue,...
&lt;br&gt;this leads to the following exception on oracle databases (and we made a test with DB2 and it also fails)
&lt;br&gt;ORA-00932: inconsistent datatypes: expected - got CLOB
&lt;br&gt;&lt;br&gt;This is because DISTINCT queries are not allowed on BLOB or CLOB fields. 
&lt;br&gt;Is this expected behavior?
&lt;br&gt;Did we miss a restriction of eclipselink? 
&lt;br&gt;Is there a way to not generate the query without DISTINCT?
&lt;br&gt;&lt;br&gt;In toplink we never had this problem, so it seems that toplink did not generate the DISTINCT.
&lt;br&gt;&lt;br&gt;Here is the Stack Trace.
&lt;br&gt;&lt;br&gt;regards,
&lt;br&gt;Hans
&lt;br&gt;&lt;br&gt;org.eclipse.persistence.exceptions.DatabaseException: Internal Exception: java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got CLOB Error Code: 932 Call: SELECT DISTINCT t1.ID, t1.EXPLICITVERSION, t1.STRINGVALUE, t1.UUID, .....
&lt;br&gt;org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:332) 
&lt;br&gt;org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:667) 
&lt;br&gt;org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:512) 
&lt;br&gt;org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:536) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262) 
&lt;br&gt;org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:599) 
&lt;br&gt;org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2518) 
&lt;br&gt;org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2476) 
&lt;br&gt;org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:481) 
&lt;br&gt;org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:928) 
&lt;br&gt;org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664) 
&lt;br&gt;org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:889) 
&lt;br&gt;org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:458) 
&lt;br&gt;org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2244) 
&lt;br&gt;org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181) 
&lt;br&gt;org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1165) 
&lt;br&gt;org.eclipse.persistence.mappings.ManyToManyMapping.extractResultFromBatchQuery(ManyToManyMapping.java:231) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.BatchValueHolder.instantiate(BatchValueHolder.java:58) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:71) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:161) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:230) 
&lt;br&gt;org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83) 
&lt;br&gt;org.eclipse.persistence.indirection.IndirectMap.buildDelegate(IndirectMap.java:110) 
&lt;br&gt;org.eclipse.persistence.indirection.IndirectMap.getDelegate(IndirectMap.java:316) 
&lt;br&gt;org.eclipse.persistence.indirection.IndirectMap.containsKey(IndirectMap.java:165) 
&lt;br&gt;&lt;br&gt;_____________________________________________________________
&lt;br&gt;DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für 
&lt;br&gt;16,99 Euro/mtl.!* Hier klicken: &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390360&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndirectMap.containsKey-leads-to-Exception-because-DISTINCT-on-%40Lob-Field-tp26390360p26390360.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26380381</id>
	<title>ReadAllQuery fetch all</title>
	<published>2009-11-16T14:02:08Z</published>
	<updated>2009-11-16T14:02:08Z</updated>
	<author>
		<name>jandam</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&amp;nbsp; &amp;nbsp;can you help me? please. I have Entity with lazy mappings. I need &amp;nbsp;
&lt;br&gt;to read all Entity attributes Eager&amp;Lazy trough ReadAllQuery &amp;nbsp;
&lt;br&gt;(ScrollableCursor) and detach them. I need to use Entities after &amp;nbsp;
&lt;br&gt;closing EM and EMF. So they can no longer fetch lazy mappings.
&lt;br&gt;I need to work with selected Entities from JTable (needs lazy) in &amp;nbsp;
&lt;br&gt;another context (needs all attributes including lazy mappings).
&lt;br&gt;Is there any way how to do it in EclipseLink 1.1.3 Java SE, I prefer &amp;nbsp;
&lt;br&gt;annotations or direct methods in EM/EMF/UOW.
&lt;br&gt;Thank you very much.
&lt;br&gt;&amp;nbsp; &amp;nbsp; Martin
&lt;br&gt;&lt;br&gt;PS Sorry for my english
&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26380381&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ReadAllQuery-fetch-all-tp26380381p26380381.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26379826</id>
	<title>Re: Postgres arrays</title>
	<published>2009-11-16T13:30:31Z</published>
	<updated>2009-11-16T13:30:31Z</updated>
	<author>
		<name>Mike Traum-2</name>
	</author>
	<content type="html">I seem to have worked out my issues. I upgraded the jdbc driver from 
&lt;br&gt;postgresql-8.2-506.jdbc3.jar to postgresql-8.4-701.jdbc4.jar and 
&lt;br&gt;postgres now returns the boxed types instead of the primitive arrays.
&lt;br&gt;&lt;br&gt;mike
&lt;br&gt;&lt;br&gt;Mike Traum wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; I'm trying to get a mapping for postgres arrays working. I'm using a 
&lt;br&gt;&amp;gt; Converter and thus far (without a lot of testing), inserting an array 
&lt;br&gt;&amp;gt; seems to work fine. But, when reading that array, eclipselink (1.2) 
&lt;br&gt;&amp;gt; throws the following exception before we even get to the Converter:
&lt;br&gt;&amp;gt; java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.Object;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor.buildArrayObjectFromArray(ObjectRelationalDataTypeDescriptor.java:326) 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The problem seems to be that eclipselink is attempting to cast 
&lt;br&gt;&amp;gt; java.sql.Array.getArray() to Object[], but postgres returns an array 
&lt;br&gt;&amp;gt; of primitives. This seems like an eclipselink bug, no? Any idea for a 
&lt;br&gt;&amp;gt; workaround?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26379826&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Postgres-arrays-tp26376036p26379826.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26376036</id>
	<title>Postgres arrays</title>
	<published>2009-11-16T09:30:57Z</published>
	<updated>2009-11-16T09:30:57Z</updated>
	<author>
		<name>Mike Traum-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I'm trying to get a mapping for postgres arrays working. I'm using a 
&lt;br&gt;Converter and thus far (without a lot of testing), inserting an array 
&lt;br&gt;seems to work fine. But, when reading that array, eclipselink (1.2) 
&lt;br&gt;throws the following exception before we even get to the Converter:
&lt;br&gt;java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.Object;
&lt;br&gt;&amp;nbsp; &amp;nbsp; at 
&lt;br&gt;org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor.buildArrayObjectFromArray(ObjectRelationalDataTypeDescriptor.java:326)
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;The problem seems to be that eclipselink is attempting to cast 
&lt;br&gt;java.sql.Array.getArray() to Object[], but postgres returns an array of 
&lt;br&gt;primitives. This seems like an eclipselink bug, no? Any idea for a 
&lt;br&gt;workaround?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26376036&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Postgres-arrays-tp26376036p26376036.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26373992</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-16T07:34:09Z</published>
	<updated>2009-11-16T07:34:09Z</updated>
	<author>
		<name>Shaun Smith</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
You can enter a bug/enhancement request in Eclipse's bugzilla.&amp;nbsp; You'll
need to create an account before you can enter a bug.&amp;nbsp; EclipseLink is
an RT project and here's a quick link to entering an EclipseLink bug: &lt;a href=&quot;https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Shaun&lt;br&gt;
&lt;br&gt;
Dirk Hermanns wrote:
&lt;blockquote cite=&quot;mid:1bd0af4b0911160724l687bfcbw56c94f12ffd2f2bd@mail.gmail.com&quot; type=&quot;cite&quot;&gt;Hi Shaun!&lt;br&gt;
  &lt;br&gt;
  &lt;div class=&quot;gmail_quote&quot;&gt;2009/11/16 Shaun Smith &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373992&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shaun.smith@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
  &lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
    &lt;div bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;Hi Dirk,&lt;br&gt;
    &lt;br&gt;
Dirk Hermanns wrote:
    &lt;blockquote type=&quot;cite&quot;&gt;...
      &lt;div class=&quot;im&quot;&gt;&lt;br&gt;
What
i would like to have even more is, that each bundle has it's own
fragment of the persistence.xml file. Each one should contain&lt;br&gt;
only that Entity classes of the osgi bundle itself.&lt;br&gt;
      &lt;/div&gt;
    &lt;/blockquote&gt;
There's currently no support for persistence.xml &quot;fragments&quot; but it is
an interesting idea.
    &lt;div class=&quot;im&quot;&gt;&lt;br&gt;
    &lt;blockquote type=&quot;cite&quot;&gt;&lt;br&gt;
Is this possible? The reason behind this is, that i want to modularize
my system into osgi bundles. Each bundle has its own&lt;br&gt;
entities, but they are all running in the same database. And i would
like to have only one emf, so that i can share the entities&lt;br&gt;
among all bundles.&lt;br&gt;
    &lt;/blockquote&gt;
    &lt;/div&gt;
I understand what you're trying to achieve but there's nothing now.&amp;nbsp;
We'd have to think about and investigate how this could be done.&amp;nbsp; Can
you file an enhancement request for this?&lt;/div&gt;
  &lt;/blockquote&gt;
  &lt;div&gt;&amp;nbsp;&lt;/div&gt;
  &lt;div&gt;Sure -&amp;nbsp; if you can point me to the destination where i can do
this ;)&lt;br&gt;
  &lt;br&gt;
  &lt;/div&gt;
  &lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
    &lt;div bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
    &lt;div class=&quot;im&quot;&gt;&lt;br&gt;
    &lt;blockquote type=&quot;cite&quot;&gt;&lt;br&gt;
In the attached link you are talking about:&lt;br&gt;
&quot;&lt;span&gt;&quot;Just to confirm that in pre 2.0 EclipseLink
you do need all of your entities in the same bundle as your
persistence.xml for weaving to work&lt;/span&gt;&quot;&quot;&lt;br&gt;
      &lt;br&gt;
So will the distribution of entities only work f&amp;uuml;r EclipseLink 2.0? Is
there already a release date for 2.0?&lt;br&gt;
    &lt;/blockquote&gt;
    &lt;/div&gt;
Distribution should work pre-2.0.&amp;nbsp; It's only weaving that will not work
across multiple bundles pre-2.0.&amp;nbsp; You should be able to get something
working and when you upgrade to 2.0 weaving will be possible.&amp;nbsp; The
current GA date is December 10th, 2009.&amp;nbsp; You can find the project
calendar here: &lt;a moz-do-not-send=&quot;true&quot; href=&quot;http://www.google.com/calendar/embed?src=2gbj1in54n5qblravii82qhti4@group.calendar.google.com&amp;amp;ctz=Canada/Toronto&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/calendar/embed?src=2gbj1in54n5qblravii82qhti4@...&amp;amp;ctz=Canada/Toronto&lt;/a&gt;&lt;br&gt;
    &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Shaun&lt;br&gt;
    &lt;blockquote type=&quot;cite&quot;&gt;&lt;br&gt;
Thx a lot,&lt;br&gt;
Dirk
      &lt;pre&gt;&lt;hr size=&quot;4&quot; width=&quot;90%&quot;&gt;&lt;div class=&quot;im&quot;&gt;
_______________________________________________
eclipselink-users mailing list
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373992&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;a moz-do-not-send=&quot;true&quot; href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;
  &lt;/div&gt;&lt;/pre&gt;
    &lt;/blockquote&gt;
    &lt;br&gt;
    &lt;div class=&quot;im&quot;&gt;
    &lt;div&gt;-- &lt;br&gt;
    &lt;a moz-do-not-send=&quot;true&quot; href=&quot;http://www.oracle.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img moz-do-not-send=&quot;true&quot; src=&quot;&quot; alt=&quot;Oracle&quot; border=&quot;0&quot; height=&quot;26&quot; width=&quot;114&quot;&gt;&lt;/a&gt;&lt;br&gt;
    &lt;font color=&quot;#666666&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;&gt;Shaun Smith | Principal Product Manager&lt;br&gt;
Phone: +19055023094 &lt;br&gt;
    &lt;font color=&quot;#ff0000&quot;&gt;Oracle&lt;/font&gt; Server Technologies, Oracle
TopLink&lt;br&gt;
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
Ontario | L5R 3P4&lt;/font&gt;
    &lt;br&gt;
    &lt;a moz-do-not-send=&quot;true&quot; href=&quot;http://www.oracle.com/commitment&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img moz-do-not-send=&quot;true&quot; src=&quot;&quot; alt=&quot;Green Oracle&quot; align=&quot;absmiddle&quot; border=&quot;0&quot; height=&quot;28&quot; width=&quot;44&quot;&gt;&lt;/a&gt;
    &lt;font color=&quot;#4b7d42&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;Oracle is committed to developing practices and products that
help protect the environment&lt;/font&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;br&gt;
_______________________________________________&lt;br&gt;
eclipselink-users mailing list&lt;br&gt;
    &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373992&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&lt;br&gt;
    &lt;a moz-do-not-send=&quot;true&quot; href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;
    &lt;br&gt;
  &lt;/blockquote&gt;
  &lt;/div&gt;
  &lt;br&gt;
  &lt;pre wrap=&quot;&quot;&gt;
&lt;hr size=&quot;4&quot; width=&quot;90%&quot;&gt;
_______________________________________________
eclipselink-users mailing list
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373992&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;
  &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;div class=&quot;moz-signature&quot;&gt;-- &lt;br&gt;
&lt;a href=&quot;http://www.oracle.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://old.nabble.com/attachment/26373992/0/oracle_sig_logo.gif&quot; alt=&quot;Oracle&quot; border=&quot;0&quot; height=&quot;26&quot; width=&quot;114&quot;&gt;&lt;/a&gt;&lt;br&gt;
&lt;font color=&quot;#666666&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;&gt;Shaun Smith | Principal Product Manager&lt;br&gt;
Phone: +19055023094 &lt;br&gt;
&lt;font color=&quot;#ff0000&quot;&gt;Oracle&lt;/font&gt; Server Technologies, Oracle TopLink&lt;br&gt;
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
Ontario | L5R 3P4&lt;/font&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.oracle.com/commitment&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://old.nabble.com/attachment/26373992/1/green-for-email-sig_0.gif&quot; alt=&quot;Green Oracle&quot; align=&quot;absmiddle&quot; border=&quot;0&quot; height=&quot;28&quot; width=&quot;44&quot;&gt;&lt;/a&gt;
&lt;font color=&quot;#4b7d42&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;Oracle is committed to developing practices and products that
help protect the environment&lt;/font&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373992&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26373992.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26373825</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-16T07:24:02Z</published>
	<updated>2009-11-16T07:24:02Z</updated>
	<author>
		<name>dhermanns</name>
	</author>
	<content type="html">Hi Shaun!&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/16 Shaun Smith &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373825&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shaun.smith@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;



  

&lt;div bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
Hi Dirk,&lt;br&gt;
&lt;br&gt;
Dirk Hermanns wrote:
&lt;blockquote type=&quot;cite&quot;&gt;...&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
What
i would like to have even more is, that each bundle has it&amp;#39;s own
fragment of the persistence.xml file. Each one should contain&lt;br&gt;
only that Entity classes of the osgi bundle itself.&lt;br&gt;
&lt;/div&gt;&lt;/blockquote&gt;
There&amp;#39;s currently no support for persistence.xml &amp;quot;fragments&amp;quot; but it is
an interesting idea.&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;blockquote type=&quot;cite&quot;&gt;&lt;br&gt;
Is this possible? The reason behind this is, that i want to modularize
my system into osgi bundles. Each bundle has its own&lt;br&gt;
entities, but they are all running in the same database. And i would
like to have only one emf, so that i can share the entities&lt;br&gt;
among all bundles.&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;
I understand what you&amp;#39;re trying to achieve but there&amp;#39;s nothing now. 
We&amp;#39;d have to think about and investigate how this could be done.  Can
you file an enhancement request for this?&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Sure -  if you can point me to the destination where i can do this ;)&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;blockquote type=&quot;cite&quot;&gt;&lt;br&gt;
In the attached link you are talking about:&lt;br&gt;
&amp;quot;&lt;span&gt;&amp;quot;Just to confirm that in pre 2.0 EclipseLink
you do need all of your entities in the same bundle as your
persistence.xml for weaving to work&lt;/span&gt;&amp;quot;&amp;quot;&lt;br&gt;
  &lt;br&gt;
So will the distribution of entities only work für EclipseLink 2.0? Is
there already a release date for 2.0?&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;
Distribution should work pre-2.0.  It&amp;#39;s only weaving that will not work
across multiple bundles pre-2.0.  You should be able to get something
working and when you upgrade to 2.0 weaving will be possible.  The
current GA date is December 10th, 2009.  You can find the project
calendar here: &lt;a href=&quot;http://www.google.com/calendar/embed?src=2gbj1in54n5qblravii82qhti4@group.calendar.google.com&amp;amp;ctz=Canada/Toronto&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/calendar/embed?src=2gbj1in54n5qblravii82qhti4@...&amp;amp;ctz=Canada/Toronto&lt;/a&gt;&lt;br&gt;

&lt;br&gt;
    Shaun&lt;br&gt;
&lt;blockquote type=&quot;cite&quot;&gt;&lt;br&gt;
Thx a lot,&lt;br&gt;
Dirk
  &lt;pre&gt;&lt;hr size=&quot;4&quot; width=&quot;90%&quot;&gt;&lt;div class=&quot;im&quot;&gt;
_______________________________________________
eclipselink-users mailing list
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373825&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;
  &lt;/div&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;div class=&quot;im&quot;&gt;
&lt;div&gt;-- &lt;br&gt;
&lt;a href=&quot;http://www.oracle.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;&quot; alt=&quot;Oracle&quot; border=&quot;0&quot; height=&quot;26&quot; width=&quot;114&quot;&gt;&lt;/a&gt;&lt;br&gt;
&lt;font color=&quot;#666666&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;&gt;Shaun Smith | Principal Product Manager&lt;br&gt;
Phone: +19055023094 &lt;br&gt;
&lt;font color=&quot;#ff0000&quot;&gt;Oracle&lt;/font&gt; Server Technologies, Oracle TopLink&lt;br&gt;
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
Ontario | L5R 3P4&lt;/font&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.oracle.com/commitment&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;&quot; alt=&quot;Green Oracle&quot; align=&quot;absmiddle&quot; border=&quot;0&quot; height=&quot;28&quot; width=&quot;44&quot;&gt;&lt;/a&gt;
&lt;font color=&quot;#4b7d42&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;Oracle is committed to developing practices and products that
help protect the environment&lt;/font&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;br&gt;_______________________________________________&lt;br&gt;
eclipselink-users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373825&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373825&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26373825.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26373408</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-16T07:00:43Z</published>
	<updated>2009-11-16T07:00:43Z</updated>
	<author>
		<name>Shaun Smith</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
Hi Dirk,&lt;br&gt;
&lt;br&gt;
Dirk Hermanns wrote:
&lt;blockquote cite=&quot;mid:1bd0af4b0911160647j1daeab69y550cf4d2a90d9219@mail.gmail.com&quot; type=&quot;cite&quot;&gt;...&lt;br&gt;
What
i would like to have even more is, that each bundle has it's own
fragment of the persistence.xml file. Each one should contain&lt;br&gt;
only that Entity classes of the osgi bundle itself.&lt;br&gt;
&lt;/blockquote&gt;
There's currently no support for persistence.xml &quot;fragments&quot; but it is
an interesting idea.&lt;br&gt;
&lt;blockquote cite=&quot;mid:1bd0af4b0911160647j1daeab69y550cf4d2a90d9219@mail.gmail.com&quot; type=&quot;cite&quot;&gt;&lt;br&gt;
Is this possible? The reason behind this is, that i want to modularize
my system into osgi bundles. Each bundle has its own&lt;br&gt;
entities, but they are all running in the same database. And i would
like to have only one emf, so that i can share the entities&lt;br&gt;
among all bundles.&lt;br&gt;
&lt;/blockquote&gt;
I understand what you're trying to achieve but there's nothing now.&amp;nbsp;
We'd have to think about and investigate how this could be done.&amp;nbsp; Can
you file an enhancement request for this?&lt;br&gt;
&lt;blockquote cite=&quot;mid:1bd0af4b0911160647j1daeab69y550cf4d2a90d9219@mail.gmail.com&quot; type=&quot;cite&quot;&gt;&lt;br&gt;
In the attached link you are talking about:&lt;br&gt;
&quot;&lt;span&gt;&quot;Just to confirm that in pre 2.0 EclipseLink
you do need all of your entities in the same bundle as your
persistence.xml for weaving to work&lt;/span&gt;&quot;&quot;&lt;br&gt;
  &lt;br&gt;
So will the distribution of entities only work f&amp;uuml;r EclipseLink 2.0? Is
there already a release date for 2.0?&lt;br&gt;
&lt;/blockquote&gt;
Distribution should work pre-2.0.&amp;nbsp; It's only weaving that will not work
across multiple bundles pre-2.0.&amp;nbsp; You should be able to get something
working and when you upgrade to 2.0 weaving will be possible.&amp;nbsp; The
current GA date is December 10th, 2009.&amp;nbsp; You can find the project
calendar here: &lt;a href=&quot;http://www.google.com/calendar/embed?src=2gbj1in54n5qblravii82qhti4@group.calendar.google.com&amp;amp;ctz=Canada/Toronto&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/calendar/embed?src=2gbj1in54n5qblravii82qhti4@...&amp;amp;ctz=Canada/Toronto&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Shaun&lt;br&gt;
&lt;blockquote cite=&quot;mid:1bd0af4b0911160647j1daeab69y550cf4d2a90d9219@mail.gmail.com&quot; type=&quot;cite&quot;&gt;&lt;br&gt;
Thx a lot,&lt;br&gt;
Dirk
  &lt;pre wrap=&quot;&quot;&gt;
&lt;hr size=&quot;4&quot; width=&quot;90%&quot;&gt;
_______________________________________________
eclipselink-users mailing list
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373408&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;
  &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;div class=&quot;moz-signature&quot;&gt;-- &lt;br&gt;
&lt;a href=&quot;http://www.oracle.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://old.nabble.com/attachment/26373408/0/oracle_sig_logo.gif&quot; alt=&quot;Oracle&quot; border=&quot;0&quot; height=&quot;26&quot; width=&quot;114&quot;&gt;&lt;/a&gt;&lt;br&gt;
&lt;font color=&quot;#666666&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;&gt;Shaun Smith | Principal Product Manager&lt;br&gt;
Phone: +19055023094 &lt;br&gt;
&lt;font color=&quot;#ff0000&quot;&gt;Oracle&lt;/font&gt; Server Technologies, Oracle TopLink&lt;br&gt;
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
Ontario | L5R 3P4&lt;/font&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.oracle.com/commitment&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://old.nabble.com/attachment/26373408/1/green-for-email-sig_0.gif&quot; alt=&quot;Green Oracle&quot; align=&quot;absmiddle&quot; border=&quot;0&quot; height=&quot;28&quot; width=&quot;44&quot;&gt;&lt;/a&gt;
&lt;font color=&quot;#4b7d42&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;Oracle is committed to developing practices and products that
help protect the environment&lt;/font&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373408&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26373408.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26373194</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-16T06:47:11Z</published>
	<updated>2009-11-16T06:47:11Z</updated>
	<author>
		<name>dhermanns</name>
	</author>
	<content type="html">Hi Shaun!&lt;br&gt;&lt;br&gt;Thanks for your quick reply. You wrote that i can distribute entities of the same persistence unit over different osgi bundles.&lt;br&gt;What
i would like to have even more is, that each bundle has it&amp;#39;s own
fragment of the persistence.xml file. Each one should contain&lt;br&gt;
only that Entity classes of the osgi bundle itself.&lt;br&gt;&lt;br&gt;Is this possible? The reason behind this is, that i want to modularize my system into osgi bundles. Each bundle has its own&lt;br&gt;entities, but they are all running in the same database. And i would like to have only one emf, so that i can share the entities&lt;br&gt;

among all bundles.&lt;br&gt;&lt;br&gt;In the attached link you are talking about:&lt;br&gt;&amp;quot;&lt;span&gt;&amp;quot;Just to confirm that in pre 2.0 EclipseLink
you do need all of your entities in the same bundle as your
persistence.xml for weaving to work&lt;/span&gt;&amp;quot;&amp;quot;&lt;br&gt;&lt;br&gt;So will the distribution of entities only work für EclipseLink 2.0? Is there already a release date for 2.0?&lt;br&gt;&lt;br&gt;Thx a lot,&lt;br&gt;Dirk
&lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26373194&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26373194.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26372533</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-16T06:10:06Z</published>
	<updated>2009-11-16T06:10:06Z</updated>
	<author>
		<name>Shaun Smith</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
dhermanns wrote:&lt;br&gt;
&lt;blockquote cite=&quot;mid:26367497.post@talk.nabble.com&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;&lt;!----&gt;
Is there anything new regarding Equinox support? It seems to us that auto
discovering ist still not working with equinox - or am i missing something?
  &lt;/pre&gt;
&lt;/blockquote&gt;
Auto discovery has not been implemented in EclipseLink OSGi.&amp;nbsp; Auto
discovery is supported in Java EE and can be enabled in Java SE but it
may be expensive because of the size of a given application's
classpath.&amp;nbsp; My assumption is that auto discovery in OSGi will be
challenging given its classloader architecture and the lack of an
&quot;application&quot; concept.&amp;nbsp; In Java EE, the persistence unit scope is
limited to the EAR or WAR.&amp;nbsp; In OSGi there is currently no mechanism to
identify a set of bundles as comprising an application and therefore a
scope for auto discovery.&lt;br&gt;
&lt;blockquote cite=&quot;mid:26367497.post@talk.nabble.com&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;
Further more, i would like to have Entities distributed over multiple osgi
bundles, but they should be in the same persistence unit (so that e.g.
transactions are working). We are using the different bundles to modularize
our application. 
  &lt;/pre&gt;
&lt;/blockquote&gt;
This is supported.&lt;br&gt;
&lt;blockquote cite=&quot;mid:26367497.post@talk.nabble.com&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;
I was searching a lot about this topic but can't find something about it.
Can anyone help about my 2 questions?
  &lt;/pre&gt;
&lt;/blockquote&gt;
In a recent thread [1] on the forum there was a discussion of byte code
weaving in Equinox that you may find interesting.&amp;nbsp; Due to the way
annotations are processed in EclipseLink 2.0, byte code weaving of
entities in multiple bundles is possible.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp; Shaun&lt;br&gt;
&lt;br&gt;
[1] &lt;a href=&quot;http://www.eclipse.org/forums/index.php?t=msg&amp;amp;th=156817&amp;amp;start=0&amp;amp;S=4292c26762cd93d81cfbf4f79b30b9a7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eclipse.org/forums/index.php?t=msg&amp;amp;th=156817&amp;amp;start=0&amp;amp;S=4292c26762cd93d81cfbf4f79b30b9a7&lt;/a&gt;
&lt;div class=&quot;moz-signature&quot;&gt;-- &lt;br&gt;
&lt;a href=&quot;http://www.oracle.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://old.nabble.com/attachment/26372533/0/oracle_sig_logo.gif&quot; alt=&quot;Oracle&quot; border=&quot;0&quot; height=&quot;26&quot; width=&quot;114&quot;&gt;&lt;/a&gt;&lt;br&gt;
&lt;font color=&quot;#666666&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;&gt;Shaun Smith | Principal Product Manager&lt;br&gt;
Phone: +19055023094 &lt;br&gt;
&lt;font color=&quot;#ff0000&quot;&gt;Oracle&lt;/font&gt; Server Technologies, Oracle TopLink&lt;br&gt;
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
Ontario | L5R 3P4&lt;/font&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.oracle.com/commitment&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://old.nabble.com/attachment/26372533/1/green-for-email-sig_0.gif&quot; alt=&quot;Green Oracle&quot; align=&quot;absmiddle&quot; border=&quot;0&quot; height=&quot;28&quot; width=&quot;44&quot;&gt;&lt;/a&gt;
&lt;font color=&quot;#4b7d42&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;Oracle is committed to developing practices and products that
help protect the environment&lt;/font&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26372533&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26372533.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26367497</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-15T23:07:48Z</published>
	<updated>2009-11-15T23:07:48Z</updated>
	<author>
		<name>dhermanns</name>
	</author>
	<content type="html">&lt;br&gt;Hi!
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Shaun Smith wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;&amp;quot;I'm working on it in conjunction with enabling byte code weaving in 
&lt;br&gt;Equinox. ;-) &amp;nbsp;This is a ways off so hopefully you can live with listing 
&lt;br&gt;the classes for now. &amp;nbsp;I expect we'll see a big improvement in the ease 
&lt;br&gt;of use as we transition over to OSGi in EclipseLink and we get more 
&lt;br&gt;experience with it.&amp;quot;
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Is there anything new regarding Equinox support? It seems to us that auto discovering ist still not working with equinox - or am i missing something?
&lt;br&gt;&lt;br&gt;Further more, i would like to have Entities distributed over multiple osgi bundles, but they should be in the same persistence unit (so that e.g. transactions are working). We are using the different bundles to modularize our application. 
&lt;br&gt;&lt;br&gt;I was searching a lot about this topic but can't find something about it.
&lt;br&gt;Can anyone help about my 2 questions?
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26367497.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26367494</id>
	<title>Re: Defining persistence.xml programmatically?</title>
	<published>2009-11-15T22:57:41Z</published>
	<updated>2009-11-15T22:57:41Z</updated>
	<author>
		<name>dhermanns</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;quot;I'm working on it in conjunction with enabling byte code weaving in 
&lt;br&gt;Equinox. ;-) &amp;nbsp;This is a ways off so hopefully you can live with listing 
&lt;br&gt;the classes for now. &amp;nbsp;I expect we'll see a big improvement in the ease 
&lt;br&gt;of use as we transition over to OSGi in EclipseLink and we get more 
&lt;br&gt;experience with it.&amp;quot;
&lt;br&gt;&lt;br&gt;Is there anything new regarding Equinox support? It seems to us that auto discovering ist still not working with equinox - or am i missing something?
&lt;br&gt;&lt;br&gt;Further more, i would like to have Entities distributed over multiple osgi bundles, but they should be in the same persistence unit (so that e.g. transactions are working). We are using the different bundles to modularize our application. 
&lt;br&gt;&lt;br&gt;I was searching a lot about this topic but can't find something about it.
&lt;br&gt;Can anyone help about my 2 questions?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defining-persistence.xml-programatically--tp16402511p26367494.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26355609</id>
	<title>Re: How eclipselink handles Sequences?</title>
	<published>2009-11-14T17:26:38Z</published>
	<updated>2009-11-14T17:26:38Z</updated>
	<author>
		<name>saasira</name>
	</author>
	<content type="html">&lt;div&gt;Hi James,&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;    I think I found a solution to my problem...&lt;/div&gt;
&lt;div&gt;    &lt;/div&gt;
&lt;div&gt;   Here is what I did:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;           Database:Postgres&lt;/div&gt;
&lt;div&gt;           Application Server: Glassfish V2.1&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;           Database Sequence: Increment=1,Cache=100&lt;/div&gt;
&lt;div&gt;           Sequence Pre Allocation Size Annotation on Entity=100&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;  I tried with parallelly/simultaneously populating the data with three different applications: eclipselink based application,pgAdmin, psql (command line shell for postgres); I&amp;#39;m happy to say that everything worked fine with out any collisions  and no gaps in numbers generated by the sequence. Of course, if any of the client has fetched a set of numbers(specified by the Cache size) and closed the connection before completely using up the set of numbers fetched, then there will be unused ids. However, we can eliminate this by reducing the cache size to 50 or 25, based on our needs.&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;So, the solution is not to synchronize allocation size with sequence increment value but to sysnchronize the allocation size with Cache size of the sequence.&lt;/div&gt;
&lt;div&gt;In this way, we can eliminate the collision of numbers as well as reduce the gaps that may be produced in case of Increment_Value Vs allocationSize sync.. &lt;br&gt;&lt;/div&gt;
&lt;div&gt;If you find any issues with this approach, can you please explain those?&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Thanks and Regards,&lt;/div&gt;
&lt;div&gt;Samba&lt;br&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 11, 2009 at 1:28 PM, Samba &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26355609&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;saasira@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi James,&lt;/div&gt;
&lt;div&gt;    Thanks for your response.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;I have a need where the same database is used by three different applications: eclipselink , JDBC(legacy), and stored procedures which are used mainly during bulk operations and upgrade scenarios.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;In such a scenario, I cannot have that luxury of unused id values, as there will be too many over a period of time and the sequence soon becomes exhausted; may be I&amp;#39;m exaggerating when I say that this may happen soon but nevertheless, there will be 50 times lesser available ids, provided allocation size is set at 50.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;By the way, I suppose that incrementing a sequence value will be DML and not DDL, after all we are not altering the name of the sequence  or dropping it, and databases are capable of handling concurrency.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;In fact, eclipselink is behaving correctly in case of Table Sequences and updating the SEQUIENCE_COUNT column by 50 when ever it prefetches id values by that number.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;So, why is this differential treatment in case of native Sequences? shouldn&amp;#39;t eclipselink increment the sequence value by 50  as it does in case of Table Sequence?&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;h5&quot;&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Nov 10, 2009 at 9:41 PM, James Sutherland &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26355609&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jamesssss@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;&lt;br&gt;The purpose of sequence preallocation is to improve performance.  If you want&lt;br&gt;your increment to be 1, then set your preallocation size to 1, and there&lt;br&gt;
will be no issues.  If you want to improve performance, then you need to set&lt;br&gt;your increment to the preallocation size, if this is say 50, this will not&lt;br&gt;cause any issues with the other application if it assumes it is 1, ids will&lt;br&gt;
not collide, you will have some unused ids, but that should not be an issue.&lt;br&gt;&lt;br&gt;Changing DDL objects on the fly, is not a very good idea.&lt;br&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;saasira wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; This following is quoted from the eclipselink User Guide :&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;quot;The key difference between Oracle Type Sequencing process and the process&lt;br&gt;&amp;gt; involved in table sequencing is that EclipseLink is unaware of the&lt;br&gt;
&lt;/div&gt;&amp;gt; INCREMENTconstruct on the&lt;br&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&amp;gt; SEQUENCE object. EclipseLink sequencing and the Oracle SEQUENCE object&lt;br&gt;&amp;gt; operate in isolation. To avoid sequencing errors in the application, set&lt;br&gt;&amp;gt; the&lt;br&gt;&amp;gt; EclipseLink preallocation size and the Oracle SEQUENCE object INCREMENT to&lt;br&gt;
&amp;gt; the same value. Note that the Oracle sequence object must have a starting&lt;br&gt;&amp;gt; value equal to the preallocation size because when EclipseLink gets the&lt;br&gt;&amp;gt; next&lt;br&gt;&amp;gt; sequence value, it assume it has the previous preallocation size of&lt;br&gt;
&amp;gt; values.&amp;quot;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; We have a scenario where the database is updated not only by an eclipse&lt;br&gt;&amp;gt; link&lt;br&gt;&amp;gt; based application but by stored procedures as well. for that matter, I&lt;br&gt;&amp;gt; believe that we cannot make an assumption that the eclipse link is owning&lt;br&gt;
&amp;gt; the database and operates on it in isolation.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; So, if we use the increment value of the  sequence to the preallocation&lt;br&gt;&amp;gt; size&lt;br&gt;&amp;gt; defined on  the eclipse link entity definition, then there will be a lot&lt;br&gt;
&amp;gt; of&lt;br&gt;&amp;gt;  sequence values unused.&lt;br&gt;&amp;gt; But if we set the increment value of the sequence to nominal 1, then there&lt;br&gt;&amp;gt; is every chance of collision with the values generated by sequence and&lt;br&gt;&amp;gt; that&lt;br&gt;&amp;gt; generated by eclipse link.&lt;br&gt;
&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Now my question is why can&amp;#39;t the eclipse link update the sequence object&lt;br&gt;&amp;gt; by&lt;br&gt;&amp;gt; the preallocation size when ever it want to prefetch values? why is it&lt;br&gt;&amp;gt; updating only by the original increment size of the sequence even though&lt;br&gt;
&amp;gt; it&lt;br&gt;&amp;gt; is presuming it acquired the amount o values mentioned in the&lt;br&gt;&amp;gt; preallocation&lt;br&gt;&amp;gt; size in the entity?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; for example, had eclipse link done some thing like this:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; on Oracle:&lt;br&gt;
&amp;gt;&lt;br&gt;&amp;gt; ALTER SEQUENCE SEQUENCE_NAME INCREMENT BY &amp;#39;preallocation_size&amp;#39;; where ever&lt;br&gt;&amp;gt; eclipse link wanted to prefetch the values&lt;br&gt;&amp;gt; and then resetting it back to&lt;br&gt;&amp;gt; ALTER SEQUENCE SEQUENCE_NAME INCREMENT BY &amp;#39;original_increment_value&amp;#39;;&lt;br&gt;
&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; then there can be no error at any point , who ever may update the database&lt;br&gt;&amp;gt; from any where as long as sequence is properly used.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Can this be achieved by any setting by which I can force elipselink to&lt;br&gt;
&amp;gt; always update the sequence value by preallocation size and not the&lt;br&gt;&amp;gt; INCREMENT&lt;br&gt;&amp;gt; SIZE?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Thanks and Regards,&lt;br&gt;&amp;gt; Samba&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;-----&lt;br&gt;&lt;a href=&quot;http://wiki.eclipse.org/User:James.sutherland.oracle.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/User:James.sutherland.oracle.com&lt;/a&gt; James Sutherland&lt;br&gt;&lt;a href=&quot;http://www.eclipse.org/eclipselink/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.eclipse.org/eclipselink/&lt;/a&gt;&lt;br&gt;
 EclipseLink ,  &lt;a href=&quot;http://www.oracle.com/technology/products/ias/toplink/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.oracle.com/technology/products/ias/toplink/&lt;/a&gt;&lt;br&gt;TopLink&lt;br&gt;Wiki:  &lt;a href=&quot;http://wiki.eclipse.org/EclipseLink&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://wiki.eclipse.org/EclipseLink&lt;/a&gt; EclipseLink ,&lt;br&gt;
&lt;a href=&quot;http://wiki.oracle.com/page/TopLink&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://wiki.oracle.com/page/TopLink&lt;/a&gt; TopLink&lt;br&gt;Forums:  &lt;a href=&quot;http://forums.oracle.com/forums/forum.jspa?forumID=48&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://forums.oracle.com/forums/forum.jspa?forumID=48&lt;/a&gt; TopLink ,&lt;br&gt;
&lt;a href=&quot;http://www.nabble.com/EclipseLink-f26430.html&quot; target=&quot;_blank&quot;&gt;http://www.nabble.com/EclipseLink-f26430.html&lt;/a&gt; EclipseLink&lt;br&gt;Book:  &lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://en.wikibooks.org/wiki/Java_Persistence&lt;/a&gt; Java Persistence&lt;br&gt;
--&lt;br&gt;&lt;/div&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/How-eclipselink-handles-Sequences--tp26283654p26286010.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/How-eclipselink-handles-Sequences--tp26283654p26286010.html&lt;/a&gt;&lt;br&gt;

&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Sent from the EclipseLink - Users mailing list archive at Nabble.com.&lt;br&gt;&lt;br&gt;_______________________________________________&lt;br&gt;eclipselink-users mailing list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26355609&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26355609&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-eclipselink-handles-Sequences--tp26283654p26355609.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26323837</id>
	<title>Re: Aggregate Functions in ORDER BY</title>
	<published>2009-11-12T10:26:16Z</published>
	<updated>2009-11-12T10:26:16Z</updated>
	<author>
		<name>tware</name>
	</author>
	<content type="html">Hi Derek,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;The syntax that includes the &amp;quot;AS&amp;quot; in the select clause is only legal in JPA 
&lt;br&gt;2.0. &amp;nbsp;To get this to work, please try our latest 2.0 milestone.
&lt;br&gt;&lt;br&gt;-Tom
&lt;br&gt;&lt;br&gt;Derek Knapp wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; thanks for the reply Tom. &amp;nbsp;I tried this
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return em.createQuery(&amp;quot;SELECT MAX(a.date) AS maxdate, c &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;FROM Activity a INNER JOIN a.cookieid 
&lt;br&gt;&amp;gt; cookie &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;INNER JOIN cookie.contactidCollection c &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;INNER JOIN c.listidCollection l &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;WHERE l.userid = :user &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;AND a.companyid = :company &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;AND a.date BETWEEN :start AND :end &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;GROUP BY c &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;ORDER BY maxdate DESC&amp;quot;)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;user&amp;quot;, user)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;company&amp;quot;, user.getCompanyid())
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;start&amp;quot;, start)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;end&amp;quot;, end)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .getResultList();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; but get the following exception
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Caused by: Exception [EclipseLink-8024] (Eclipse Persistence Services - 
&lt;br&gt;&amp;gt; 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.JPQLException
&lt;br&gt;&amp;gt; Exception Description: Syntax error parsing the query [SELECT 
&lt;br&gt;&amp;gt; MAX(a.date) AS maxdate, c FROM Activity a INNER JOIN a.cookieid cookie 
&lt;br&gt;&amp;gt; INNER JOIN cookie.contactidCollection c INNER JOIN c.listidCollection l 
&lt;br&gt;&amp;gt; WHERE l.userid = :user AND a.companyid = :company AND a.date BETWEEN 
&lt;br&gt;&amp;gt; :start AND :end GROUP BY c ORDER BY maxdate DESC], line 1, *column 19: 
&lt;br&gt;&amp;gt; syntax error at [AS].*
&lt;br&gt;&amp;gt; Internal Exception: MismatchedTokenException(8!=27)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.exceptions.JPQLException.syntaxErrorAt(JPQLException.java:355)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.handleRecognitionException(JPQLParser.java:304)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.addError(JPQLParser.java:245)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.reportError(JPQLParser.java:362)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.recoverFromMismatchedElement(Unknown 
&lt;br&gt;&amp;gt; Source)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(Unknown 
&lt;br&gt;&amp;gt; Source)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.mismatch(Unknown 
&lt;br&gt;&amp;gt; Source)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.match(Unknown 
&lt;br&gt;&amp;gt; Source)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.fromClause(JPQLParser.java:1880)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectStatement(JPQLParser.java:341)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.document(JPQLParser.java:261)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.parse(JPQLParser.java:133)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.buildParseTree(JPQLParser.java:94)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:203)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:170)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:134)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:95)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:80)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:740)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 68 more
&lt;br&gt;&amp;gt; Caused by: MismatchedTokenException(8!=27)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 81 more
&lt;br&gt;&amp;gt; StandardWrapperValve[Blocking Servlet]: PWC1406: Servlet.service() for 
&lt;br&gt;&amp;gt; servlet Blocking Servlet threw exception
&lt;br&gt;&amp;gt; MismatchedTokenException(8!=27)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.mismatch(Unknown 
&lt;br&gt;&amp;gt; Source)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.match(Unknown 
&lt;br&gt;&amp;gt; Source)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.fromClause(JPQLParser.java:1880)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectStatement(JPQLParser.java:341)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.document(JPQLParser.java:261)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.parse(JPQLParser.java:133)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.buildParseTree(JPQLParser.java:94)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:203)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:170)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:134)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:95)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:80)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:740)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.util.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:349)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.iTrac.Beans.ActivityFacade.getWebHotlist(ActivityFacade.java:182)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:597)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at $Proxy827.getWebHotlist(Unknown Source)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at itrac.report.webhotlist.load(webhotlist.java:78)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:597)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.faces.component.UICommand.broadcast(UICommand.java:383)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at 
&lt;br&gt;&amp;gt; com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26323837&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26323837&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Aggregate-Functions-in-ORDER-BY-tp26308330p26323837.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26320172</id>
	<title>Re: starting out with eclipselink eclipse tools</title>
	<published>2009-11-12T06:58:50Z</published>
	<updated>2009-11-12T06:58:50Z</updated>
	<author>
		<name>tware</name>
	</author>
	<content type="html">EclipseLink is available on the update site for the Runtime Project in Eclipse 
&lt;br&gt;Galileo. &amp;nbsp;Note: Eclipse is a runtime environment for various persistence 
&lt;br&gt;strategies (including JPA). &amp;nbsp;There are details at www.eclipse.org/eclipselink
&lt;br&gt;&lt;br&gt;If you are looking for JPA tools, you will likely also want to get Eclipse Dali.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.eclipse.org/webtools/dali/main.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.eclipse.org/webtools/dali/main.php&lt;/a&gt;&lt;br&gt;&lt;br&gt;Dali provides JPA tooling.
&lt;br&gt;&lt;br&gt;-Tom
&lt;br&gt;&lt;br&gt;David Parker wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I've been working with eclipse for a while, and still don't understand 
&lt;br&gt;&amp;gt; it as well as I should. I just started using the Eclipse IDE, and would 
&lt;br&gt;&amp;gt; like to use the eclipselink tools to work with my existing JPA classes, 
&lt;br&gt;&amp;gt; and hopefully find some problems.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Could I get a pointer to how I install/configure the eclipselink tools 
&lt;br&gt;&amp;gt; in eclipse?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; TIA
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - DAP
&lt;br&gt;&amp;gt; =============================================
&lt;br&gt;&amp;gt; David Parker
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26320172&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dap@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26320172&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26320172&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/starting-out-with-eclipselink-eclipse-tools-tp26320043p26320172.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26320043</id>
	<title>starting out with eclipselink eclipse tools</title>
	<published>2009-11-12T06:52:06Z</published>
	<updated>2009-11-12T06:52:06Z</updated>
	<author>
		<name>DavidParker</name>
	</author>
	<content type="html">I've been working with eclipse for a while, and still don't understand &amp;nbsp;
&lt;br&gt;it as well as I should. I just started using the Eclipse IDE, and &amp;nbsp;
&lt;br&gt;would like to use the eclipselink tools to work with my existing JPA &amp;nbsp;
&lt;br&gt;classes, and hopefully find some problems.
&lt;br&gt;&lt;br&gt;Could I get a pointer to how I install/configure the eclipselink tools &amp;nbsp;
&lt;br&gt;in eclipse?
&lt;br&gt;&lt;br&gt;TIA
&lt;br&gt;&lt;br&gt;- DAP
&lt;br&gt;=============================================
&lt;br&gt;David Parker
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26320043&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dap@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26320043&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/starting-out-with-eclipselink-eclipse-tools-tp26320043p26320043.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26318334</id>
	<title>Re: Search using Expression API - Is there an  easier way?</title>
	<published>2009-11-12T05:07:52Z</published>
	<updated>2009-11-12T05:07:52Z</updated>
	<author>
		<name>tch</name>
	</author>
	<content type="html">I'll probably do the same thing, and once JPA 2.0 comes out , convert
&lt;br&gt;it over to that API which should be trivial since it's based on EL
&lt;br&gt;expressions.
&lt;br&gt;&lt;br&gt;What's stopping you from releasing your Expression tools? Is it
&lt;br&gt;commercial code? If not, you could always throw it up on Google Code
&lt;br&gt;or something. I'd be curious to see how some other people are using
&lt;br&gt;it.
&lt;br&gt;&lt;br&gt;./tch
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Thu, Nov 12, 2009 at 3:03 AM, ossaert &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318334&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;decooman@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, I have been designing a complete back-end using the Expressions API.
&lt;br&gt;&amp;gt; It gives me much more flexibility than normal EQL-queries. I can dynamically
&lt;br&gt;&amp;gt; add parameters, change queries, re-use expressions, etc. I really like the
&lt;br&gt;&amp;gt; fact, when you use them correctly, then you can refactor your code swiftly
&lt;br&gt;&amp;gt; unlike EQL and SQL.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Although the examples and description of the API could be extended and
&lt;br&gt;&amp;gt; enhanced to show more real-life scenarios. I wish I had the time to
&lt;br&gt;&amp;gt; contribute my findings and experiences with the powerful Expressions API.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Greetings,
&lt;br&gt;&amp;gt; Jan De Cooman
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks that's slightly better I suppose, I didn't think to do it that
&lt;br&gt;&amp;gt; way. My only issue with QBE is it's not quite flexible enough for more
&lt;br&gt;&amp;gt; complex queries from what I can see. Though I was unable to find a
&lt;br&gt;&amp;gt; list of all the different qbe policies, someone doesn't happen to have
&lt;br&gt;&amp;gt; a link to that do they? Or even better if the string constants for the
&lt;br&gt;&amp;gt; addSpecialOperation method were constants in a class somewhere that
&lt;br&gt;&amp;gt; would be nice.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ./tch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Search-using-Expression-API---Is-there-an-easier-way--tp26267399p26314858.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Search-using-Expression-API---Is-there-an-easier-way--tp26267399p26314858.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the EclipseLink - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318334&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318334&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Search-using-Expression-API---Is-there-an-easier-way--tp26267399p26318334.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26314858</id>
	<title>Re: Search using Expression API - Is there an  easier way?</title>
	<published>2009-11-12T00:03:29Z</published>
	<updated>2009-11-12T00:03:29Z</updated>
	<author>
		<name>ossaert</name>
	</author>
	<content type="html">&lt;br&gt;Well, I have been designing a complete back-end using the Expressions API. It gives me much more flexibility than normal EQL-queries. I can dynamically add parameters, change queries, re-use expressions, etc. I really like the fact, when you use them correctly, then you can refactor your code swiftly unlike EQL and SQL.
&lt;br&gt;&lt;br&gt;Although the examples and description of the API could be extended and enhanced to show more real-life scenarios. I wish I had the time to contribute my findings and experiences with the powerful Expressions API.
&lt;br&gt;&lt;br&gt;Greetings,
&lt;br&gt;Jan De Cooman
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;tch&quot;&gt;&lt;br&gt;Thanks that's slightly better I suppose, I didn't think to do it that
&lt;br&gt;way. My only issue with QBE is it's not quite flexible enough for more
&lt;br&gt;complex queries from what I can see. Though I was unable to find a
&lt;br&gt;list of all the different qbe policies, someone doesn't happen to have
&lt;br&gt;a link to that do they? Or even better if the string constants for the
&lt;br&gt;addSpecialOperation method were constants in a class somewhere that
&lt;br&gt;would be nice.
&lt;br&gt;&lt;br&gt;./tch
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Search-using-Expression-API---Is-there-an-easier-way--tp26267399p26314858.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26309875</id>
	<title>Re: Aggregate Functions in ORDER BY</title>
	<published>2009-11-11T14:29:45Z</published>
	<updated>2009-11-11T14:29:45Z</updated>
	<author>
		<name>Derek Knapp-3</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
thanks for the reply Tom.&amp;nbsp; I tried this&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return em.createQuery(&quot;SELECT MAX(a.date) AS maxdate, c &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;FROM Activity a INNER JOIN a.cookieid
cookie &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;INNER JOIN cookie.contactidCollection c
&quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;INNER JOIN c.listidCollection l &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;WHERE l.userid = :user &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;AND a.companyid = :company &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;AND a.date BETWEEN :start AND :end &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;GROUP BY c &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;ORDER BY maxdate DESC&quot;)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;user&quot;, user)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;company&quot;, user.getCompanyid())&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;start&quot;, start)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;end&quot;, end)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getResultList();&lt;br&gt;
&lt;br&gt;
but get the following exception&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Caused by: Exception [EclipseLink-8024] (Eclipse Persistence Services -
1.0.2 (Build 20081024)):
org.eclipse.persistence.exceptions.JPQLException&lt;br&gt;
Exception Description: Syntax error parsing the query [SELECT
MAX(a.date) AS maxdate, c FROM Activity a INNER JOIN a.cookieid cookie
INNER JOIN cookie.contactidCollection c INNER JOIN c.listidCollection l
WHERE l.userid = :user AND a.companyid = :company AND a.date BETWEEN
:start AND :end GROUP BY c ORDER BY maxdate DESC], line 1, &lt;b&gt;column
19: syntax error at [AS].&lt;/b&gt;&lt;br&gt;
Internal Exception: MismatchedTokenException(8!=27)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.exceptions.JPQLException.syntaxErrorAt(JPQLException.java:355)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.handleRecognitionException(JPQLParser.java:304)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.addError(JPQLParser.java:245)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.reportError(JPQLParser.java:362)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.recoverFromMismatchedElement(Unknown
Source)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(Unknown
Source)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.mismatch(Unknown
Source)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.match(Unknown
Source)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.fromClause(JPQLParser.java:1880)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectStatement(JPQLParser.java:341)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.document(JPQLParser.java:261)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.parse(JPQLParser.java:133)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.buildParseTree(JPQLParser.java:94)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:203)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:170)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:134)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:95)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:80)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:740)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... 68 more&lt;br&gt;
Caused by: MismatchedTokenException(8!=27)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... 81 more&lt;br&gt;
StandardWrapperValve[Blocking Servlet]: PWC1406: Servlet.service() for
servlet Blocking Servlet threw exception&lt;br&gt;
MismatchedTokenException(8!=27)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.mismatch(Unknown
Source)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer.match(Unknown
Source)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.fromClause(JPQLParser.java:1880)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.selectStatement(JPQLParser.java:341)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLParser.document(JPQLParser.java:261)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.parse(JPQLParser.java:133)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser.buildParseTree(JPQLParser.java:94)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:203)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:170)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:134)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:95)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.&amp;lt;init&amp;gt;(EJBQueryImpl.java:80)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:740)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.util.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:349)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.iTrac.Beans.ActivityFacade.getWebHotlist(ActivityFacade.java:182)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:597)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at $Proxy827.getWebHotlist(Unknown Source)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at itrac.report.webhotlist.load(webhotlist.java:78)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:597)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.el.parser.AstValue.invoke(AstValue.java:187)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at javax.faces.component.UICommand.broadcast(UICommand.java:383)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)&lt;br&gt;
&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26309875&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Aggregate-Functions-in-ORDER-BY-tp26308330p26309875.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26308540</id>
	<title>Re: Aggregate Functions in ORDER BY</title>
	<published>2009-11-11T13:00:25Z</published>
	<updated>2009-11-11T13:00:25Z</updated>
	<author>
		<name>tware</name>
	</author>
	<content type="html">Hi Derek,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;The spec says you cannot quite do what you are proposing, but offers a way to 
&lt;br&gt;order by Aggregate Expressions.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;You can do something like this:
&lt;br&gt;&lt;br&gt;Select MAX(a.date) as maxdate from DateEntity order by maxdate.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;I have just been told there may be a bug with a query above in EclipseLink, 
&lt;br&gt;but it is something we should be able to address - so feel free to file a bug if 
&lt;br&gt;you have issues.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;BTW: The &amp;quot;as&amp;quot; clause ( as maxdate) is not allowed in a constructor 
&lt;br&gt;expression, but you may be able to come up with a query that achieves what you want.
&lt;br&gt;&lt;br&gt;-Tom
&lt;br&gt;&lt;br&gt;&lt;br&gt;Derek Knapp wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; is it possible to do something like this?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return em.createQuery(&amp;quot;SELECT new 
&lt;br&gt;&amp;gt; itrac.data.WebHotlist(MAX(a.date) as maxdate, c) &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;FROM Activity a INNER JOIN a.cookieid 
&lt;br&gt;&amp;gt; cookie &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;INNER JOIN cookie.contactidCollection c &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;INNER JOIN c.listidCollection l &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;WHERE l.userid = :user &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;AND a.companyid = :company &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;AND a.date BETWEEN :start AND :end &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;GROUP BY c &amp;quot; +
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;ORDER BY *MAX(a.date)* DESC&amp;quot;)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;user&amp;quot;, user)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;company&amp;quot;, user.getCompanyid())
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;start&amp;quot;, start)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&amp;quot;end&amp;quot;, end)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .getResultList();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; if not, is it best to use a sorted collection, and make the WebHotlist 
&lt;br&gt;&amp;gt; comparable?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; eclipselink-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26308540&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;/div&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26308540&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Aggregate-Functions-in-ORDER-BY-tp26308330p26308540.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26308330</id>
	<title>Aggregate Functions in ORDER BY</title>
	<published>2009-11-11T12:49:12Z</published>
	<updated>2009-11-11T12:49:12Z</updated>
	<author>
		<name>Derek Knapp-3</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
is it possible to do something like this?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return em.createQuery(&quot;SELECT new
itrac.data.WebHotlist(MAX(a.date) as maxdate, c) &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;FROM Activity a INNER JOIN a.cookieid
cookie &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;INNER JOIN cookie.contactidCollection c
&quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;INNER JOIN c.listidCollection l &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;WHERE l.userid = :user &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;AND a.companyid = :company &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;AND a.date BETWEEN :start AND :end &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;GROUP BY c &quot; +&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;ORDER BY &lt;b&gt;MAX(a.date)&lt;/b&gt; DESC&quot;)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;user&quot;, user)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;company&quot;, user.getCompanyid())&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;start&quot;, start)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .setParameter(&quot;end&quot;, end)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getResultList();&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
if not, is it best to use a sorted collection, and make the WebHotlist
comparable?&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;eclipselink-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26308330&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eclipselink-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.eclipse.org/mailman/listinfo/eclipselink-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Aggregate-Functions-in-ORDER-BY-tp26308330p26308330.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26298851</id>
	<title>Re: how can I reference a foreign key in ejbql where condition?</title>
	<published>2009-11-11T02:04:30Z</published>
	<updated>2009-11-11T02:04:30Z</updated>
	<author>
		<name>zamek42</name>
	</author>
	<content type="html">hello James,
&lt;br&gt;&lt;br&gt;thx for response.
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;James Sutherland wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Are you using JPA? &amp;nbsp;EJBQL/JPQL is normally used from JPA using the JPA Query interface.
&lt;br&gt;&lt;br&gt;For using EJBQL/JPQL with an EclipseLink ReadAllQuery you need to set the argument names and values.
&lt;br&gt;&lt;br&gt;i.e.
&lt;br&gt;query.setEJBQLString(&amp;quot;Select OBJECT(sg) from sg sg where sg.foreignField = ?1&amp;quot;);
&lt;br&gt;query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;query.addArgumentValue(id);
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
I get filter criteria from smartgwt, which is a gwt frontend. I need ejbql because it sends filtering criterias in a Map&amp;lt;String,String&amp;gt;. I don't want to use an unecessary string parser, simply put criteria text into the sql.
&lt;br&gt;For a test I make a simple query:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;ReadAllQuery query = new ReadAllQuery(ChairImpl.getClass());
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.setEJBQLString(&amp;quot;Select Object(entity) from ChairImpl entity where &amp;nbsp;entity.institute=?1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.addArgument(&amp;quot;1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp;query.addArgumentValue(new Integer(10));
&lt;br&gt;&amp;nbsp; &amp;nbsp;EntityManager em = this.getEntityManager();
&lt;br&gt;&amp;nbsp; &amp;nbsp;List result = JpaHelper.createQuery(query, em).getResultList();
&lt;br&gt;&lt;br&gt;this throws an error:
&lt;br&gt;java.lang.IllegalStateException: Query argument 1 not found in the list of parameters provided during query execution.
&lt;br&gt;&lt;br&gt;ChairImpl has an attribute named institute:
&lt;br&gt;&amp;nbsp; &amp;nbsp;@ManyToOne
&lt;br&gt;&amp;nbsp; &amp;nbsp; @JoinColumn(nullable=false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; public InstituteImpl getInstitute() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return institute;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void setInstitute(InstituteImpl institute) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.institute = institute;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;What do I mistake?
&lt;br&gt;&lt;br&gt;Perhaps JpaHelper.createQuery is unecessary? How can I use readAllQuery from glassfish directly?
&lt;br&gt;&lt;br&gt;thx 
&lt;br&gt;Zamek</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-can-I-reference-a-foreign-key-in-ejbql-where-condition--tp26263446p26298851.html" />
</entry>

</feed>
