Re: Allowing property getters without a "get" prefix on DataObjects

2019-04-10 Thread Nikita Timofeev
Thanks for PR, I think I'll have some time in a few days to merge it. At first glance it seems ok. On Sat, Apr 6, 2019 at 2:58 PM Hugi Thordarson wrote: > > Thanks Nikita, we are finally well. And yes, I'd agree that the past flu > season kind of deserves an R-rated movie :). > > I finally

Re: Allowing property getters without a "get" prefix on DataObjects

2019-04-06 Thread Hugi Thordarson
Thanks Nikita, we are finally well. And yes, I'd agree that the past flu season kind of deserves an R-rated movie :). I finally submitted a PR with those slight modifications to BeanAccessor to allow for easier subclassing. If you don't see anything wrong with it it would be awesome if it

Re: Allowing property getters without a "get" prefix on DataObjects

2019-02-07 Thread Nikita Timofeev
Hi Hugi, "Flu season in Iceland" sounds like a scary movie :) Hope you are well! I've merged my pull request, so you can do yours. I don't see any problems with adding some flexibility to BeanAccessor while keeping it compatible. And thanks for sharing your use case. On Wed, Feb 6, 2019 at 7:15

Re: Allowing property getters without a "get" prefix on DataObjects

2019-02-06 Thread Hugi Thordarson
Sorry, I neglected to answer your question about the use case. Yes, we do quite a bit of work using both in-memory sorting using Ordering and filtering by Expression. Property.getFrom(...) is also very valuable when constructing dynamic UIs. Although these things can certainly be performed

Re: Allowing property getters without a "get" prefix on DataObjects

2019-02-06 Thread Hugi Thordarson
Hi Nikita! Sorry for the late reply. Flu season in Iceland, basically just happy to be alive :). I'm working with Maik on this and just tried out your solution. It works perfectly, so thanks! One point though: We would of course prefer to maintain as much of the behaviour already present in

Re: Allowing property getters without a "get" prefix on DataObjects

2019-02-04 Thread Nikita Timofeev
Hi Maik. As I'm the one researched this, let me answer :) I failed to make BeanAccessor pluggable last time because I realized that it's deep inside code not managed by Cayenne DI. But looking again at it I wonder will this straightforward solution [1] solve your problems? And I'm really

Re: Allowing property getters without a "get" prefix on DataObjects

2019-01-31 Thread Maik Musall
Hi Andrus, did you have a chance to look at this yet? The reason I ask is that our application hit the memory limit this week again (-Xmx at 96 GB), and according to some profiling, almost half of that is used up by HashMap nodes. So we're really eager to upgrade to Cayenne 4.1 to be able to

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-26 Thread David Feshbach
IIRC, EOF/Wonder allowed you to implement NSKeyValueCoding and the Utilities class would call valueForKey instead of looking up methods/fields via reflection. Something similar that would allow you to write/generate your own readProperty method might work for Cayenne. On Tue, Sep 25, 2018 at 3:28

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread Maik Musall
> Am 25.09.2018 um 16:59 schrieb John Huss : > > On Tue, Sep 25, 2018 at 9:50 AM Maik Musall > wrote: > >> >> >>> Am 25.09.2018 um 16:23 schrieb Andrus Adamchik : >>> "Should Cayenne by default work without prefixed accessors". >>> >>> >>> So how about

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread Hugi Thordarson
>> "Should Cayenne by default work without prefixed accessors". > > My answer to this : "By default, no. As a fallback or a custom strategy, > possibly." Fair enough. > I actually agree about Java beans. They are almost irrelevant now. And I wish > Java gets "data classes" and some

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread John Huss
On Tue, Sep 25, 2018 at 9:50 AM Maik Musall wrote: > > > > Am 25.09.2018 um 16:23 schrieb Andrus Adamchik : > > > >> "Should Cayenne by default work without prefixed accessors". > > > > > > So how about this... Unless someone else steps in by then, let me > brainstorm it with Nikita a couple of

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread Maik Musall
> Am 25.09.2018 um 16:23 schrieb Andrus Adamchik : > >> "Should Cayenne by default work without prefixed accessors". > > > So how about this... Unless someone else steps in by then, let me brainstorm > it with Nikita a couple of weeks from now and see if we can do a DI solution. > It is

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread Andrus Adamchik
> "Should Cayenne by default work without prefixed accessors". My answer to this : "By default, no. As a fallback or a custom strategy, possibly." I actually agree about Java beans. They are almost irrelevant now. And I wish Java gets "data classes" and some transparent form of "properties".

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread Hugi Thordarson
Hi Andrus and thanks for the reply, allowing replacement of the entire reflection strategy is certainly nice and would allow me to make the customizations I need. However, if it's OK with you, rather than discuss implementation details, I'd like to take two steps back and revert to the more

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread Andrus Adamchik
Hi Hugi, My vote would be to do it right. There is a positive side effect that the entire reflection strategy suddenly becomes customizable. Andrus > On Sep 25, 2018, at 7:11 AM, Hugi Thordarson wrote: > > Hi Andrus, and y'all. > > I've been looking into this and it seems like a rather

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-25 Thread Hugi Thordarson
Hi Andrus, and y'all. I've been looking into this and it seems like a rather large change to allow something relatively simple (allowing DataObjects to have accessor methods that don't start with a "get"-prefix). Would people be diametrically opposed to just changing BeanAccessor so that it

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-20 Thread Andrus Adamchik
Hi Maik, In Cayenne a canonical way to override services is via DI. A PR that follows that approach has a good chance of acceptance. From a quick glance, I wonder if this new DI endpoint should be a factory of ClassDescriptorMap (which is currently lazily created inside EntityResolver). We

Re: Allowing property getters without a "get" prefix on DataObjects

2018-09-19 Thread Maik Musall
Hi all, I'd like to pull up this discussion from one year ago again. I'm currently running 4.0 and testing upgrading to 4.1 using field-based DataObjects, and I'm hitting the hard-coded prefixes in BeanAccessor that prevent me from proceeding. Yes, in theory I could sigh, yield, and use "get"

Re: Allowing property getters without a "get" prefix on DataObjects

2017-09-26 Thread Musall, Maik
+1 :-) > Am 26.09.2017 um 15:32 schrieb Hugi Thordarson : > > Hi Michael, > > thanks for an honest attempt to convince me. Hard sell, though. :) > > I use a lot of 3rd party libraries and I've only hit one time where using the > bean spec was necessary — JasperReports. That

Re: Allowing property getters without a "get" prefix on DataObjects

2017-09-26 Thread Michael Gentry
Hi Hugi, Let me try to sell you on the "get" prefix. :-) (I did a lot of WebObjects/EOF in the past, in Objective-C and Java, so I understand the reluctance.) * The "get" prefix is part of the JavaBeans standard/contract. With the exception of "is" for booleans (with a little "b"). * There

Allowing property getters without a "get" prefix on DataObjects

2017-09-26 Thread Hugi Thordarson
Hi all Touching on an old subject that has now become more important with field-based Data Objects. All of my DataObjects use accessor methods without the "get"-prefix. This was fine with Map Based data objects (where a MapAccessor would get property values by name), but now that my objects