Re: Cayenne 5.0-M1 is out

2024-09-28 Thread Lon Varscsak
You should force at least 17 😈 On Sep 27, 2024 at 2:23:02 PM, Andrus Adamchik wrote: > A belated, but nonetheless exciting announcement. Our team recently > released the first milestone of Cayenne 5.0. > > There are more than a hundred Jiras in the release notes, so it is easy to > get lost šŸ™ƒ B

Re: Force update of column

2023-05-02 Thread Lon Varscsak
erything is customizable of course :) > > Thanks, > Andrus > > > On Apr 27, 2023, at 12:09 AM, Lon Varscsak > wrote: > > > > Hey all, > > > > I of course have an unusual situation that I'm not sure how to handle. > :) > > > > I was goi

Force update of column

2023-04-26 Thread Lon Varscsak
Hey all, I of course have an unusual situation that I'm not sure how to handle. :) I was going to write a lot of background, but I don't know if it would help or just confuse the situation. 🤣 The situation I have is in one specific situation, I'd like Cayenne to always add an attribute to the U

Re: Regression from 4.2-RC2 to 4.2-RC3

2022-12-14 Thread Lon Varscsak
n your case. > > > > Andrus > > > > > > > On Dec 13, 2022, at 10:08 PM, Lon Varscsak > wrote: > > > > > > My guess is the new logic in > > > DefaultDataDomainFlushAction.mergeSameObjectIds with OpIdFactory has a > > > flaw.

Re: Regression from 4.2-RC2 to 4.2-RC3

2022-12-13 Thread Lon Varscsak
My guess is the new logic in DefaultDataDomainFlushAction.mergeSameObjectIds with OpIdFactory has a flaw. It's a little above my paygrade to figure out why. 🤣 On Tue, Dec 13, 2022 at 1:44 PM Lon Varscsak wrote: > I have a pretty serious regression between these versions. I'm no

Regression from 4.2-RC2 to 4.2-RC3

2022-12-13 Thread Lon Varscsak
I have a pretty serious regression between these versions. I'm not 100% sure what's going on yet, but figured I'd drop a note and see if anyone has any thoughts. I have a situation where I remove all the objects in a relationship, and then reinsert them (same PK). This has been working in 4.2 fo

Re: Natural keys

2022-03-16 Thread Lon Varscsak
I have natural keys just about everywhere and have only encountered one issue. Exposing the key to the DataObject is fine, but don't expose the same key in a detail object. So if you have OrderHeader.orderNumber that can be exposed, but if that object has a to-many to OrderLines and also has orde

Re: Problem with optional to-one deletion

2021-11-30 Thread Lon Varscsak
mapped that as To-Many AND To-Dependent PK, which doesn't make > sense. > > > On Tue, Nov 16, 2021 at 6:14 PM Lon Varscsak > wrote: > > > I forgot to mention that I'm running 4.2.M4-SNAPSHOT (updated from github > > as of an hour ago). > > > > O

Re: Problem with optional to-one deletion

2021-11-30 Thread Lon Varscsak
e > in > > > > your PK/FK mapping on the DbEntities. > > > > > > > > For example, in order_header, you have order_header ->> > > > order_detail_sales, > > > > but you've mapped that as To-Many AND To-Dependent PK, which doesn't

Re: Problem with optional to-one deletion

2021-11-16 Thread Lon Varscsak
I forgot to mention that I'm running 4.2.M4-SNAPSHOT (updated from github as of an hour ago). On Tue, Nov 16, 2021 at 4:06 PM Lon Varscsak wrote: > Hey all, > > I have a setup where I have an optional to-one relationship, but when I > try to clear the relationship and commitCha

Problem with optional to-one deletion

2021-11-16 Thread Lon Varscsak
Hey all, I have a setup where I have an optional to-one relationship, but when I try to clear the relationship and commitChanges, I get a low-level Cayenne error along with some in appropriate sql generated. where it's doing an UPDATE to order_detail_costs should be a no-op, because the object wa

Re: Insertion order issue

2021-11-09 Thread Lon Varscsak
I have a DB that doesn't have deferred constraints, so I had ObjectStyle build org.apache.cayenne.access.flush.operation.GraphBasedDbRowOpSorter. It's less efficient, but honestly I don't really notice a performance hit. It's also not perfect (it triggers fetches sometimes of related data), but in

Re: Dealing with a commit exception....

2021-06-23 Thread Lon Varscsak
You could commit your batch of 10 and then on error, check each object against the DB. If the batch succeeds, there is nothing special to do. Assuming your "failure" batches are infrequent, then the time to check them won't be an issue. On Wed, Jun 23, 2021 at 9:54 AM Tony Giaccone wrote: > Yea

Re: CayenneModeler crash

2021-04-19 Thread Lon Varscsak
aunch. > > Andrus > > > On Apr 19, 2021, at 2:31 AM, Lon Varscsak > wrote: > > > > Hey all, > > > > For some reason the recent version of CayenneModeler (4.2.M4-SNAPSHOT) > > crashes on launch. The only thing I did was upgrade packages in > HomeB

CayenneModeler crash

2021-04-18 Thread Lon Varscsak
Hey all, For some reason the recent version of CayenneModeler (4.2.M4-SNAPSHOT) crashes on launch. The only thing I did was upgrade packages in HomeBrew. I'm running on an M1 MacBook Air. I recompiled it and no luck. If I run from the command line, it works fine though. šŸ¤” Here's the console f

Re: SQLTemplate date types

2021-02-04 Thread Lon Varscsak
wanting to deal with java.sql.Timestamp. > > Andrus > > > On Feb 3, 2021, at 9:04 AM, Lon Varscsak wrote: > > > > Is there any way to change the default date types that get returned by > > SQLTemplate queries to use java.time classes instead of Date? > > &g

SQLTemplate date types

2021-02-02 Thread Lon Varscsak
Is there any way to change the default date types that get returned by SQLTemplate queries to use java.time classes instead of Date? I know I can specify it for specific queries (#result), but I want to change them for the whole application. Thanks, Lon

Re: Problems with fetching modified object information

2020-12-23 Thread Lon Varscsak
Assuming these are in the same JVM, I think what you're looking for is peer context synchronization. This is disabled by default (but might have been on by default previously). Wherever you create your ServerRuntime you can add this: binder.bindMap(Boolean.class, Constants.PROPERTIES_MAP).put(Co

Re: Resetting an object back to committed state (including relationships)

2020-11-10 Thread Lon Varscsak
, Oct 18, 2020 at 12:12 AM Andrus Adamchik wrote: > "invalidateObjects" should invalidate relationships too. IIRC this worked > exactly as you'd expect in a root context. I don't use nested contexts. > Wonder if a bug crept in there? > > Andrus > > >

Resetting an object back to committed state (including relationships)

2020-10-17 Thread Lon Varscsak
I have a situation where I need to invalidate an object and have it go back to it's committed state (whether that's from the db or a parent context). If I invalidate the object, it's attributes seem to do what I'm expecting, but it appears that it leaves relationships alone. I need a way to inval

Re: 4.2 official release date

2020-06-10 Thread Lon Varscsak
I am running 4.2.M2-SNAPSHOT 🤫 in production :P On Wed, Jun 10, 2020 at 1:06 PM John Huss wrote: > For what it is worth, I often run pre-release versions in production. I am > not running 4.2.M1 yet, but have tested it a lot and have not had any > problems. > > On Wed, Jun 10, 2020 at 2:28 PM An

Re: likeIgnoreCase

2020-04-16 Thread Lon Varscsak
It's simply %string%. I can try that. On Thu, Apr 16, 2020 at 7:21 AM Michael Gentry wrote: > Hi Lon, > > What does your pattern look like? Did you try adding a "?s" to your > expression? > > > On Wed, Apr 15, 2020 at 11:05 PM Lon Varscsak > wrote: >

likeIgnoreCase

2020-04-15 Thread Lon Varscsak
Hey all, trying to use likeIgnoreCase on an in-memory list and it appears not to work if there is a new line in the text. The Pattern would need Pattern.DOTALL as a flat to work properly. Would you consider this a bug? -Lon

Re: New "Property" classes requiring Persistent

2019-11-22 Thread Lon Varscsak
t; class does not imply Persistent object anywhere, so I guess Property should > not either. > > @Nikita, what do you think? > > Andrus > > > > On Nov 15, 2019, at 1:50 AM, Lon Varscsak > wrote: > > > > Hey all, > > > > I use Property-type clas

New "Property" classes requiring Persistent

2019-11-14 Thread Lon Varscsak
Hey all, I use Property-type classes for all sorts of things, usually for Cayenne related activities...but sometimes they're really useful on POJOs too. The new Property related classes (like EntityProperty) require the class to be a subclass of Persistent. I can't see where this is actually rel

Re: State of relationships from snapshots?

2019-10-15 Thread Lon Varscsak
e494d6b7fafbeadd1a41b5d647d82438c7a0591ed87b4f3b4b3e20b@%3Cdev.cayenne.apache.org%3E > [2] > https://stackoverflow.com/questions/58318730/what-is-the-current-best-method-of-getting-the-changes-to-an-object-hierarchy-in > > > > > On Oct 7, 2019, at 2:05 PM, Lon Varscsak wrote: > >

State of relationships from snapshots?

2019-10-07 Thread Lon Varscsak
Is there any way to get the values of relationships from snapshots? I know how to do it for attributes, but can't seem to figure out how to do it for relationships. Thanks, Lon

Re: Best Practice for blobs

2019-10-03 Thread Lon Varscsak
ave the metadata for the blob, and > possibly other data as required. That way you can fetch in the name, file > size, type, etc without fetching in the blob until needed. > > > On Wed, Oct 2, 2019 at 8:02 PM Lon Varscsak > wrote: > > > Hey all, > > > > I have

Best Practice for blobs

2019-10-02 Thread Lon Varscsak
Hey all, I have a blob column in an entity, but I don't want to always actually load the blob, just on demand (but I still want to be able to see the other attributes in the entity). Any best practice here to have the blob be lazy? Thanks, Lon

Re: 4.2 modeler change

2019-10-02 Thread Lon Varscsak
I concur with the idea that a Java-served web app (hosted inside an Electron app) would be best. @Emmerson - I don't know if there were JIRAs created, I didn't create them personally. On Wed, Oct 2, 2019 at 8:20 AM Michael Gentry wrote: > On Wed, Oct 2, 2019 at 11:10 AM Andrus Adamchik > wrote

Re: 4.2 modeler change

2019-09-26 Thread Lon Varscsak
s Adamchik wrote: > Screenshots are stripped by the list management software, but the > description is pretty clear. I am not using 4.2 myself, but we do need to > fix it before we release 4.2.M1. > > Andrus > > > On Sep 26, 2019, at 1:08 AM, Lon Varscsak > wrote: > &

4.2 modeler change

2019-09-25 Thread Lon Varscsak
Hey all, It looks like when adding a db-relationship in the Modeler (4.2.M1-SNAPSHOT from today) the potential target entities is not sorted (which is only mildly annoying), but doesn't contain any target entities outside of the current data map (blocker). Am i missing something? Thanks! -Lon

Re: Removing an object from a relationship and deleting

2019-08-28 Thread Lon Varscsak
nding on the model delete rules. > > Andrus > > > On Aug 27, 2019, at 8:14 PM, Lon Varscsak > wrote: > > > > Hey all, > > > > I want to confirm that there are no situations where removing an object > > from a relationship will automatically cause

Removing an object from a relationship and deleting

2019-08-27 Thread Lon Varscsak
Hey all, I want to confirm that there are no situations where removing an object from a relationship will automatically cause that object to be deleted in the OC. It's fully manual, right? -Lon

Re: Another regression in 4.2

2019-07-24 Thread Lon Varscsak
does that > trimming on "master", just like it did before: > > // the first "true" is "trimChars" > map.registerType(new CharType(true, false)); > > So this part should work. > > Andrus > > > On Jul 24, 2019, at 2:18 PM, Lon Va

Re: Another regression in 4.2

2019-07-24 Thread Lon Varscsak
at...@objectstyle.com> > > wrote: > > >> > > >> So, if the previous behavior was normal, I'll move it back. > > >> This is task for it: https://issues.apache.org/jira/browse/CAY-2602 > > >> And this is commit for it: > > >>

Re: Another regression in 4.2

2019-07-23 Thread Lon Varscsak
HAR_PK_TEST t0 WHERE > RTRIM(t0.PK_COL) = ? [bind: 1->PK_COL:123] > For 4.2 SELECT RTRIM(t0.OTHER_COL), RTRIM(t0.PK_COL) FROM CHAR_PK_TEST t0 > WHERE RTRIM(t0.PK_COL) = ? [bind: 1->PK_COL:123] > Maybe you can add some more details for it? > > On Thu, Jul 18, 2019 at 7:47 PM Lo

Re: Another regression in 4.2

2019-07-18 Thread Lon Varscsak
0].[part_number])* = ? [bind: 1->part_number:'120476'] On Tue, May 14, 2019 at 10:47 AM Lon Varscsak wrote: > Thanks! > > On Sat, May 11, 2019 at 5:04 AM Nikita Timofeev > wrote: > >> Hi, >> >> Fixed this, see [1]. Thank you for another catch! >> >&g

Re: Property class and Serialization

2019-05-14 Thread Lon Varscsak
gt; Does this help? > > > https://stackoverflow.com/questions/910374/why-does-java-have-transient-fields > > > On Tue, May 14, 2019 at 5:20 PM Lon Varscsak > wrote: > > > Any reason we can't have Property be Serializable? I have situations > where > >

Property class and Serialization

2019-05-14 Thread Lon Varscsak
Any reason we can't have Property be Serializable? I have situations where I will keep references to properties in a web page (like for dynamic columns) and my framework serializes those things (or errors out if it's not serializable). I originally solved this with having my own Subclass be Seria

Re: Another regression in 4.2

2019-05-14 Thread Lon Varscsak
Thanks! On Sat, May 11, 2019 at 5:04 AM Nikita Timofeev wrote: > Hi, > > Fixed this, see [1]. Thank you for another catch! > > [1] https://issues.apache.org/jira/browse/CAY-2578 > > On Mon, May 6, 2019 at 11:28 PM Lon Varscsak > wrote: > > > >

Re: Stored Procedures

2019-05-07 Thread Lon Varscsak
On May 7, 2019, at 1:34 AM, Lon Varscsak wrote: > > > > Is there anyway to specify that an Object Entity uses a stored_procedure > to > > fetch its data? > > > > -Lon > >

Stored Procedures

2019-05-06 Thread Lon Varscsak
Is there anyway to specify that an Object Entity uses a stored_procedure to fetch its data? -Lon

Another regression in 4.2

2019-05-06 Thread Lon Varscsak
Hey all, I have a join from order_detail_sales to continuity_detail based on order_number and order_line_number. When fetching the to-one getContinuityDetail I'm getting an error because the query generated is swapping the keys: SELECT [t0].[intent_date], [t0].[line_end_date], [t0].[line_setup_d

Re: Possible regression in 4.2

2019-05-02 Thread Lon Varscsak
id RTRIM on the join conditions on > >> SQLServer, we probably shouldn't. > >> > >> Fixed-size space-padded columns (aka CHAR columns) are fundamentally > >> stupid and unfriendly. How are they even supposed to work? Can we join > them > >> with VA

Re: Another regression in 4.2

2019-05-02 Thread Lon Varscsak
You're the best! On Thu, May 2, 2019 at 6:46 AM Nikita Timofeev wrote: > Hi Lon, > > I've fixed this [1]. Select translator incorrectly translated > Expressions in some cases. > Thanks for reporting. > > [1] https://issues.apache.org/jira/browse/CAY-2575 > &g

Re: Possible regression in 4.2

2019-05-02 Thread Lon Varscsak
t; Andrus > > > On May 2, 2019, at 5:54 PM, Nikita Timofeev > wrote: > > > > Hi, > > > > This is again about new translator. Seems like I was too optimistic > > unifying SQLServer and Sybase adapters. > > This RTRIM() behavior is from SQLServer and I

Another regression in 4.2

2019-05-01 Thread Lon Varscsak
Hey again :) I have a situation where the query created is missing an "AND" resulting in invalid sql. Here is the sql that's generated: SELECT DISTINCT t0.allow_backorder, t0.allow_multiples, t0.business_unit, t0.buy_amount, t0.customer_choice, t0.end_date, t0.get_amount, t0.hidden, t0.internal_

Possible regression in 4.2

2019-05-01 Thread Lon Varscsak
Hey all, I'm working to integrate 4.2 into my code base and I've run into a snag. It appears that some queries are slower and what I'm finding is that when I have CHAR columns, that it ends up doing a join that is RTRIM(column) = RTRIM(other column). This results in the query optimizer not using

Re: Cayenne and Serialization

2019-03-07 Thread Lon Varscsak
It also appears that if you use parent/child contexts, even if you serialize both contexts, the child context doesn't remember that it's parent channel was another context. -Lon On Wed, Feb 27, 2019 at 4:16 PM Lon Varscsak wrote: > There's unfortunately no clean solution

DBImport

2019-03-05 Thread Lon Varscsak
FYI, who ever wrote the DB Import stuff...you deserve an award. Love it. That is all, :) Lon

Re: Bug when serializing/deserializing objects

2019-02-28 Thread Lon Varscsak
ns why you saw those values > in your other case. > I've pushed fix for this to 4.1 branch and tested it with your test > application. Everything looks good now. > > On Thu, Feb 28, 2019 at 2:17 AM Lon Varscsak > wrote: > > > > Also wondering, would this be a m

Re: Bug when serializing/deserializing objects

2019-02-27 Thread Lon Varscsak
t; Andrus > > > On Feb 26, 2019, at 1:00 PM, Lon Varscsak > wrote: > > > > I always forget this part, I'm working off of 4.1.M3-SNAPSHOT > > > > On Tue, Feb 26, 2019 at 10:54 AM Lon Varscsak > > wrote: > > > >> Hey all, > >> &

Re: Cayenne and Serialization

2019-02-27 Thread Lon Varscsak
> > There's unfortunately no clean solution for an "unmanaged" > (de)serialization of the context-attached auto-expanding object graph. The > one we have right now, that requires the context to be the serialization > "root", seems like the best choice out of the available options. Can you expand

Re: Bug when serializing/deserializing objects

2019-02-26 Thread Lon Varscsak
I always forget this part, I'm working off of 4.1.M3-SNAPSHOT On Tue, Feb 26, 2019 at 10:54 AM Lon Varscsak wrote: > Hey all, > > A few weeks ago I posted an email about a bug when serializing, and I > never really looked much more in to it. However, I've now encountered

Re: Cayenne and Serialization

2019-02-26 Thread Lon Varscsak
t; https://github.com/apache/cayenne/blob/STABLE-4.0/cayenne-server/src/test/java/org/apache/cayenne/DataObjectSerializationIT.java#L129 > > On Thu, Feb 7, 2019 at 2:07 AM Lon Varscsak > wrote: > > > > Hey all, > > > > Recently I switched to 4.1's field based

Bug when serializing/deserializing objects

2019-02-26 Thread Lon Varscsak
Hey all, A few weeks ago I posted an email about a bug when serializing, and I never really looked much more in to it. However, I've now encountered a different issue if I'm using Map based data objects. If I have a data object, access a relationship, then serialize the object (and it's DataCont

Cayenne and Serialization

2019-02-06 Thread Lon Varscsak
Hey all, Recently I switched to 4.1's field based data objects (I've been using 4/4.1 for a while, but using the Map based objects) and I ran into an issue. It appears that when using this type of object, the de-serialization results in an object that is not usable. It results in a HOLLOW object

Re: Bad DBA, Bad!

2018-12-13 Thread Lon Varscsak
t; I haven't tried this myself, but what happens if you eagerly prefetch this > relationship? I suspect Cayenne would just set this property to null and > there will be no FFE. > > Andrus > > > On Dec 13, 2018, at 12:35 AM, Lon Varscsak > wrote: > > > > I

Re: Bad DBA, Bad!

2018-12-12 Thread Lon Varscsak
ow to do that without forcing OriginCode to fetch for every Order fetched 100% of the time. On Wed, Dec 12, 2018 at 1:36 PM Lon Varscsak wrote: > When the code goes to try to access the Order->OriginCode.getProperty() it > goes to fire the fault and will trigger that exception. > >

Re: Bad DBA, Bad!

2018-12-12 Thread Lon Varscsak
uess during the insertion by using a not existent FK, right? > > if it is not the case, please provide details in order to understand the > full context! > > Thanks > > EmeCas > > On Tue, Dec 11, 2018 at 7:51 PM Lon Varscsak > wrote: > > > Okay, so I have a situ

Bad DBA, Bad!

2018-12-11 Thread Lon Varscsak
Okay, so I have a situation where I have a FK to a table where the DBA was allowing objects to be deleted. Think Order to OriginCode (basically a way to know which catalog the order came from)...but the OriginCode record has been deleted. I'm going to put a stop to that, but in the meantime I nee

Re: Controlling object insert order

2018-11-01 Thread Lon Varscsak
lol, my whole DB is meaningful primary keys...yay us! So far, Cayenne's default logic has handled it without exception, but I've got all of the relationships mapped out. I'm assuming your situation is different, but I had to jump in and give a hooray for meaningful PKs. :P On Thu, Nov 1, 2018 at

Re: Finding an object in an ObjectContext

2018-08-20 Thread Lon Varscsak
an ObjectContext > > > or should I just parse through newObjects()? > > Yes. > > Andrus > > > On Aug 16, 2018, at 2:25 AM, Lon Varscsak > wrote: > > > > I have a situation where I need to query the inserted objects in an > > ObjectContext to see if

Finding an object in an ObjectContext

2018-08-15 Thread Lon Varscsak
I have a situation where I need to query the inserted objects in an ObjectContext to see if there's one already created. I know this is an odd situation, but is there a way to accomplish this or should I just parse through newObjects()? Thanks, Lon

Re: Problem with Callback not getting called in parent/child setup

2018-08-07 Thread Lon Varscsak
ot;); > > public void willUpdate() { > } > > On Tue, Aug 7, 2018 at 12:47 PM Lon Varscsak > wrote: > > > Hey all, > > > > I've got a data object who has a preUpdate callback so that I can set > > required values (like a timestamp) before update. Acco

Problem with Callback not getting called in parent/child setup

2018-08-07 Thread Lon Varscsak
Hey all, I've got a data object who has a preUpdate callback so that I can set required values (like a timestamp) before update. According to the docs this should work in the parent-child setup, but that doesn't seem to be the case. Thoughts? Here's a snippet of the stacktrace: Validation fail

Blobs and distinct

2018-07-30 Thread Lon Varscsak
Hey all, I have an entity with a blob in it, but it has has to-many joins. When I go to do a join across these, I will no longer get a distinct set of data (because at least in Sybase, you can't 'distinct' a blob column). Any ideas on how to implement this so that the blob is lazy and/or in a di

New db import work

2018-05-31 Thread Lon Varscsak
Wow! I just finally saw the new db import work. That is awesome, so much easier to use. Thanks to whomever did it all! -Lon

Re: Cayenne firing faults when it shouldn’t be (or at least I don’t think it should be)

2018-05-15 Thread Lon Varscsak
That would explain it. :) Thanks John. On Sat, May 12, 2018 at 6:27 AM, John Huss wrote: > Yes > > On Sat, May 12, 2018 at 7:12 AM Lon Varscsak > wrote: > > > I have a situation where I fetched a large amount of objects (50k) and > > prefetched a bunch of relat

Cayenne firing faults when it shouldn’t be (or at least I don’t think it should be)

2018-05-12 Thread Lon Varscsak
I have a situation where I fetched a large amount of objects (50k) and prefetched a bunch of relationships…this all worked as expected (although I didn’t realize that this set of data was that large at the time)…but what caught my eye is that even though it pre-fetched the relationships it was firi

Bad data…trying to compensate

2018-04-23 Thread Lon Varscsak
I have a foreign key id that is 0 (zero). Our old system would interpret this the same as it would for null. I'm trying to see where I could hook into the system so the Cayenne can convert these to null on the fly. Any ideas? -Lon

Re: Problem using to-many relationship on where clause

2017-11-28 Thread Lon Varscsak
I think the part that's missing is a "distinct". I'm assuming there are 4 stockcurrent_corporativo rows for that one product, but if it had a distinct it would be showing one. I don't think that ObjectSelect/FluentSelect have the ability to turn on/off distinct, but for me, this always generates

Re: QueryCache scope

2017-11-09 Thread Lon Varscsak
o a timeout. > > On Thu, Nov 9, 2017 at 10:40 AM Lon Varscsak > wrote: > > > In the case of using a more specific cache (like discussed in the other > > thread), the problem is these ā€œsmallā€ caches get abandoned. The > > documentation says ā€œlocalCacheā€ is bound

Re: Cache Groups

2017-11-09 Thread Lon Varscsak
ername or something to it) and that > will > >> work, but you'll need to have these cache names configured in your cache > >> provider already or have a default that makes sense. That might be > >> difficult to do. > >> > >> I'm interested

Re: QueryCache scope

2017-11-09 Thread Lon Varscsak
verall cache > performance. Since most caches have an LRU policy, those abandoned entries > will eventually be pushed out of the cache, replaced by more recent entries > from other contexts. > > Andrus > > > On Nov 9, 2017, at 2:08 AM, Lon Varscsak wrote: > > > >

QueryCache scope

2017-11-08 Thread Lon Varscsak
Hey all, I would have bet large sums of money that a custom implementation of QueryCache would result in a new QueryCache object per context (local). However, it looks like a NestedQueryContext gets created and only one instance of the specified QueryCache is created (in DataContextFactory). I'd

Re: Cache Groups

2017-11-08 Thread Lon Varscsak
t;false" ); > } > }; > > Maik > > > > Am 08.11.2017 um 01:40 schrieb Lon Varscsak : > > > > Hey all, > > > > I’ve been using cache groups to do refreshing of object lists and it > > occurred to me today that this refresh is across a

java.util.ConcurrentModificationException

2017-11-07 Thread Lon Varscsak
Hey guys, I have a situation that I think is caused by having the same set of objects (different object contexts) open in the same application. When my web application goes to serialize an object context (I think) I get this error: Any ideas on where to look at what I might be doing wrong? Than

Cache Groups

2017-11-07 Thread Lon Varscsak
Hey all, I’ve been using cache groups to do refreshing of object lists and it occurred to me today that this refresh is across all object contexts in my application. So if User A has a list of orders for their account and that is cached with the group ā€œorderHistoryā€ and User B also has a list of

Re: Order of insert/update/delete operations

2017-08-07 Thread Lon Varscsak
> (don't remember the API offhand). > > 1) Start transaction > 2) Perform your deletes (or whatever you need to happen first) > 3) Commit the ObjectContext > 4) Perform your other work > 5) Commit the ObjectContext > 6) Finish the transaction > > > On Tue

Re: Order of insert/update/delete operations

2017-08-01 Thread Lon Varscsak
Unfortunately, no…legacy structures. On Tue, Aug 1, 2017 at 4:33 PM, Aristedes Maniatis wrote: > On 2/8/17 9:12AM, Lon Varscsak wrote: > > In this case, because it’s an object with the same PK as a previously > > deleted object, technically I’d need deletes to happen for this

Re: Order of insert/update/delete operations

2017-08-01 Thread Lon Varscsak
, 2017 at 3:54 PM, John Huss wrote: > You're looking for the ashwood entity sorter > On Tue, Aug 1, 2017 at 5:40 PM Lon Varscsak > wrote: > > > I think in EOF I handled this with a custom ordering of operations, > where I > > had a master list of entities in the orde

Re: Order of insert/update/delete operations

2017-08-01 Thread Lon Varscsak
, Aug 1, 2017 at 3:37 PM, Lon Varscsak wrote: > Hey guys, so Cayenne does db operations in insert/update/delete > order…which makes sense in most cases. But in Sybase I don’t have deferred > constraints (it’s not an option) and if I delete an object and then > recreate it will the same

Order of insert/update/delete operations

2017-08-01 Thread Lon Varscsak
Hey guys, so Cayenne does db operations in insert/update/delete order…which makes sense in most cases. But in Sybase I don’t have deferred constraints (it’s not an option) and if I delete an object and then recreate it will the same primary key I end up with a database error because it tries to in

Re: Identity column

2017-08-01 Thread Lon Varscsak
138 > > On Tue, Aug 1, 2017 at 3:47 AM, Lon Varscsak > wrote: > > Hey guys, I have a table (or three) that uses identity columns (Sybase > > generated values…not like a sequence). Looking at the 3.0 docs it > suggests > > that it supports this for SQLServer (which wa

Identity column

2017-07-31 Thread Lon Varscsak
Hey guys, I have a table (or three) that uses identity columns (Sybase generated values…not like a sequence). Looking at the 3.0 docs it suggests that it supports this for SQLServer (which was originally based on Sybase)…but I can’t seem to find it in the code. Any idea where this is? Does it sti

Re: Java 8

2017-07-27 Thread Lon Varscsak
I support it. On Thu, Jul 27, 2017 at 5:35 AM, Nikita Timofeev wrote: > Hi all, > > There is discussion on dev@list [1], and I want to mention it here too. > The question is simple is it time to drop support for Java 7 out of > Cayenne starting from 4.1 version that is in early development now.

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-25 Thread Lon Varscsak
y and ObjectId internal > state, but still need to research this deeper. > > On Fri, Jul 21, 2017 at 4:10 AM, Lon Varscsak > wrote: > > Okay, I’ve gotten farther, but still have an issue. I’ve removed the FK > > IDs from my objects and if I don’t pre-assign PKs to them it’

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-20 Thread Lon Varscsak
partial state seems to confuse it too. I assume if I assign the order_number, then I’ll get the previous error where it tries to fault from the DB. How difficult would it be to modify Cayenne to deal with these TEMP objects better? -Lon On Thu, Jul 20, 2017 at 10:58 AM, Lon Varscsak wrote

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-20 Thread Lon Varscsak
ctId correctly) > > And there can be even more cases when meaningful Fk (as well as Pk) > can fail, so it is pretty general recommendation to stay away from > those as much as you can. > > On Thu, Jul 20, 2017 at 4:08 AM, Lon Varscsak > wrote: > > Okay here’s a ma

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-19 Thread Lon Varscsak
-SNAPSHOT. Any help would be greatly appreciated. Thanks, Lon On Wed, Jul 19, 2017 at 1:24 PM, Lon Varscsak wrote: > I can also get it to throw this error: > > Caused by: org.apache.cayenne.FaultFailureException: [v.4.1.M1-SNAPSHOT > Jul 19 2017 19:49:41] Error resolving fault, no

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-19 Thread Lon Varscsak
in question is new on an OrderHeader which isn’t new. -Lon On Wed, Jul 19, 2017 at 1:23 PM, Lon Varscsak wrote: > Okay, I’ll see if I can work up a test case. Note: This only happens if > the objects in question are new objects (not in the db). When it tries to > find th

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-19 Thread Lon Varscsak
test case? > > On Mon, Jul 17, 2017 at 9:14 PM, Lon Varscsak > wrote: > > Okay, that didn’t work. > > https://www.dropbox.com/s/68hsculni16ucg3/Screen%20Shot% > 202017-07-13%20at%2010.50.24%20AM.png?dl=0 > > > > -Lon > > > > On Mon, Jul 17, 2017

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-17 Thread Lon Varscsak
Okay, that didn’t work. https://www.dropbox.com/s/68hsculni16ucg3/Screen%20Shot%202017-07-13%20at%2010.50.24%20AM.png?dl=0 -Lon On Mon, Jul 17, 2017 at 11:06 AM, Lon Varscsak wrote: > Try this: > > http://gofile.me/34oeM/YdPU7U4j1 > > On Mon, Jul 17, 2017 at 10:08 AM, Andrus Ad

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-17 Thread Lon Varscsak
Try this: http://gofile.me/34oeM/YdPU7U4j1 On Mon, Jul 17, 2017 at 10:08 AM, Andrus Adamchik wrote: > Unfortunately the mailing list strips attachments. Could you post the > image elsewhere, like GoogleDrive or Dropbox? > > Andrus > > > On Jul 13, 2017, at 8:51 PM,

Re: Ordering using non-property values

2017-07-17 Thread Lon Varscsak
Is your key ā€œcustomerNameForSortingā€? On Mon, Jul 17, 2017 at 7:40 AM, Musall, Maik wrote: > Hi John, > > > Am 17.07.2017 um 16:08 schrieb John Huss : > > > > Expressions will work with non-modeled properties as long as the methods > > look like getters - have the "get" prefix and no arguments.

Re: Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-13 Thread Lon Varscsak
I found the line that’s nulling it out…I just don’t understand at this deep level what’s going on. Here’s the strack trace: On Thu, Jul 13, 2017 at 10:43 AM, Lon Varscsak wrote: > I have an object (that’s new) in ObjectContextA that has a relationship to > another new object (same OC)

Need a push in the right direction (parent-child object context and disappearing relationship)

2017-07-13 Thread Lon Varscsak
I have an object (that’s new) in ObjectContextA that has a relationship to another new object (same OC) which also has a reverse relationship. I then create a child of that OC (ObjectContactB) and grab a local version of the first object. At that time, the relationship object (and it’s reverse) i

Re: Slight API curiosity

2017-06-19 Thread Lon Varscsak
+1 Woot! On Fri, Jun 16, 2017 at 4:54 AM, Hugi Thordarson wrote: > > You mean Expression class has "andExp", not Property? > > Whoops—of course I did. Pardon me. > > > > The answer is "legacy". This API predates Property, ObjectSelect, and > other 4.0 additions. It was done long time ago before

  1   2   >