Hello everybody,

even if this will force me to admit how old I am, I still have some
Cayenne 3.0.2 code happily running in production with no issues.

Lately I was trying to upgrade the application from a WAR (running in
Tomcat) to a standalone application exposing the servlets via Jetty,
in order to make the application easier to deploy in a docker
container.

After some struggle to update the model, I am now facing a LOT of
deprecation warnings like this:
> [deprecation] SelectQuery in org.apache.cayenne.query has been deprecated

The code I have looks like this:
-------------------
prototypeQuery =
(SelectQuery)dataContext.getEntityResolver().lookupQuery("attachment");

parameters = new HashMap();
parameters.put("reference", aReference);
parameters.put("user", anUser);
query = prototypeQuery.queryWithParameters(parameters);

result = (List<Attachment>)dataContext.performQuery(query);
-------------------

Unfortunately I never had the opportunity to use any newer version of
Cayenne, so I haven't followed along with all the changes that it has
gone through.

Is there anyone willing to suggest me what the above code snippet
would look like with the new version of Cayenne?

Thanks,

Giulio Cesare

Reply via email to