<div dir="ltr">Hey Remi,<br><br>My usage of JPA was more for a common point of reference, as I figured most Java Developers who would subscribe to Amber would have interacted with it at one point or another. Not necessarily my personal use case, nor current need.<br><br>I did another review of the Static Meta-Model this morning. I agree it accomplishes the same scope as what I would like with the Method Reference Improvements, however it isn't an option the moment we stop dealing within JPA.<br><br>I'll review Ethan's links and write a more full overview which I'll post to the Babylon Project's list before the end of the year. (Assuming I don't get too distracted with the Class File Api)<br><br>Thanks everyone,<br>-Peter</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Dec 9, 2024 at 8:35 AM Remi Forax <<a href="mailto:forax@univ-mlv.fr">forax@univ-mlv.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div>Hello<br></div><div>are you aware of Jakarta data API ?<br></div><div>  <a href="https://github.com/jakartaee/data" target="_blank">https://github.com/jakartaee/data</a><br></div><div><br></div><div>Which is quite similar to Spring Data and provide a typesafe API,<br></div><div>here is a presentation by Gavin King<br></div><div>  <a href="https://www.youtube.com/watch?v=X9GplCb5SWY" target="_blank">https://www.youtube.com/watch?v=X9GplCb5SWY</a><br></div><div><br></div><div>For me the static meta-model does exactly what you want.<br></div><div><br></div><div>regards,<br></div><div>Rémi</div><div><br></div><hr id="m_-4501710326962170964zwchr"><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Peter Eastham" <<a href="mailto:petereastham@gmail.com" target="_blank">petereastham@gmail.com</a>><br><b>To: </b>"amber-dev" <<a href="mailto:amber-dev@openjdk.org" target="_blank">amber-dev@openjdk.org</a>><br><b>Sent: </b>Monday, December 9, 2024 2:52:32 AM<br><b>Subject: </b>Improving Method Reference Ergonomics<br></blockquote></div><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr">Hi Amber team,<br><br>Earlier this week I was playing around with fluent API design, and I believe Java could benefit from some improvements to the usage of Method References, I'll keep this short with the following example.<br><br>Lets take the following JPA Criteria from section 6.3.3 of the Specification, (Only for an example of what an API could begin doing, not should do)<br>CriteriaQuery q = cb.createQuery(Customer.class);
<br>Root customer = q.from(Customer.class);<br>Join order = customer.join(Customer_.orders, JoinType.LEFT);<br>q.where(cb.equal(customer.get(Customer_.status), 1)).select(customer);  <br><br>If there was greater access to the Method Reference more implicit information could be passed, reducing the noise,<br>CriteriaQuery q = CriteriaQuery.createQuery(Customer::new)<br>  .leftJoin(Customer::orders)<br>  .where(Object::equals, Customer::status, 1);<br>var result = q.select();<br><br>Regarding what should be available, the resolved Class and Method name at least, anything else I'd leave up to the feasibility of the change.<br><br>Thanks,<br>-Peter</div><br></blockquote></div></div></div></blockquote></div>