Shared EC woes (was: Flattened one-side M:N fails wildly with SharedEC)

2018-09-28 Thread o...@ocs.cz
. > On 26. 9. 2018, at 7:12 PM, Chuck Hill wrote: > > Hi OC, > > No, no magic like that. At least not that I know of. Subclassing > EOEditingContext, EOSharedEditingContext, maybe EODatabaseContext is probably > your best bet to pursue this. > > Chuck >

handleQueryWithUnboundKey override for 3rd party objects?

2018-09-25 Thread o...@ocs.cz
Hi there, is there any hook WO- or WOnder-side, which would allow me to catch handleQueryWithUnboundKey for 3rd party objects? Something like to be able to set up a (presumably static) method with a signature (Object object,String key), which would get called by the framework whenever an objec

Re: SSL and port fun

2017-04-07 Thread o...@ocs.cz
erver-port) and assume the access to application was SSL-protected, right? Thanks again a big lot, OC > On 2017-04-07, 9:31 AM, "Webobjects-dev on behalf of OC" > o...@ocs.cz> wrote: > >Hi there, > >my ages-old code to support SSL > >-

Re: using value conversion/factory to encode objects in blobs

2017-02-25 Thread o...@ocs.cz
D'oh. Thanks a lot! OC > On 25. 2. 2017, at 7:01 PM, Fabian Peters wrote: > > Try "blobDictionary"… ;-) > >> Am 25.02.2017 um 17:56 schrieb o...@ocs.cz: >> >> Thanks! But... sorry for me being stupid, but where do I find them? Google >&g

Re: using value conversion/factory to encode objects in blobs

2017-02-25 Thread o...@ocs.cz
. All the best, OC > On 25. 2. 2017, at 6:32 PM, George Domurot wrote: > > Use the Prototype of blodDictionary or mutableDictionary to do the heavy > lifting for you. > > -G > > >> On Feb 25, 2017, at 8:19 AM, o...@ocs.cz wrote: >> >> Hi there, >&

using value conversion/factory to encode objects in blobs

2017-02-25 Thread o...@ocs.cz
Hi there, this must be WebObjects 101 and I must be blind as a bat, but ... how on earth does one use the value conversion/factory model support to represent e.g., an attribute containing an NSDictionary (or another custom data object) by a BLOB containing archived data? Far as I understand th

Raw row fetch returns NSData instead of String for a derived attribute through a relationship?!?

2016-12-02 Thread o...@ocs.cz
Hi there, I am fetching raw rows. Most time, it works well, but I have bumped into a pretty weird behaviour with a derived attribute. The attribute is defined like this: === { className = NSString; definition = "CAST(C_AUCTION_SEQ as VARCHAR(18))"; externalType = "CH

subEntityForEntity never called?

2016-10-30 Thread o...@ocs.cz
Hello there, I must be missing something darn obvious, for my subEntityForEntity delegate method never gets called. My code looks like this: === class ModelGroupDelegate { EOEntity subEntityForEntity(EOEntity entity,NSDictionary dic) { println "&& fetching '$entity' $dic"

direct action URL without a session

2016-10-28 Thread o...@ocs.cz
Hello there, the subject says it all — is there a decent way to construct a direct action URL from a code which has no session (and thus no context)? Note I need a full URL, not a relative one (it is to be used in diverse ways like “sent to client by an e-mail” etc.) At the moment, I use Appl

Re: log4j bug causes deadlock?!? (was: which sort of application bugs hang wotaskd?)

2016-10-25 Thread o...@ocs.cz
=1308 (Interpreted > frame) > - model._DBReport.fetchDBReports(com.webobjects.eocontrol.EOEditingContext, > com.webobjects.eocontrol.EOQualifier, com.webobjects.foundation.NSArray) > @bci=103, line=141 (Interpreted frame) // my code which fetches > ... the rest, I believe, is irrelev

Re: which sort of application bugs hang wotaskd?

2016-10-24 Thread o...@ocs.cz
Thanks a lot both! (weird, I would have bet wotaskd is designed to survive and detect and potentially even relaunch frozen apps, but well, my memory self-evidently plays ugly tricks on me.) Anyway... > On 24. 10. 2016, at 6:23 PM, Chuck Hill wrote: > This should explain the how and why (IIRC)

ERXExistsQualifier blocks *all coordinators* even before a SELECT?!?

2016-10-13 Thread o...@ocs.cz
Hello there, just the very now, I have bumped into a weird problem. I run some DB-intensive background tasks. So as they do not block the whole application, I set up er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators > 1, and my code (a) gives one of the coordinators to all sessions (

WORedirect with a known MIME type?

2016-10-09 Thread o...@ocs.cz
Hello there, at the moment, my application can return a file to the user through === WOResponse downloadFile(String mimeType, File path) { WOResponse wor=new WOResponse() wor.setHeader("$mimeType; name=\"$path.name\"","content-type") wor.setContent(path.getText("utf-8"

delete deny rule ignored?

2016-10-07 Thread o...@ocs.cz
Hello there, is that normal that for a :N relationship *which is not a class property* EOF ignores EODeleteRuleDeny and deletes the object, happily leaving dangling foreign keys in the other table? (Making the relationship a class property helps. Nevertheless, since the only purpose of the rel

Re: EOF inserts already existing M:N relationships/empty snapshot?!?

2016-09-21 Thread o...@ocs.cz
ld be used to determine whether at the place and moment and particular eo it is safe to call committedSnapshotForObject or not? Thanks and all the best, OC > From: "o...@ocs.cz" > Date: Wednesday, September 21, 2016 at 1:42 PM > To: Chuck Hill > Cc: "webobjects-dev@

Re: EOF inserts already existing M:N relationships/empty snapshot?!?

2016-09-21 Thread o...@ocs.cz
Chuck, > On 21. 9. 2016, at 6:10 AM, Chuck Hill wrote: > I bet Alice was a developer too. Beware the EOF, my son! The jaws that bite, the claws that catch! Looks like I have found the culprit — seems it was the very log of the committed snapshot. It looks like that if one calls e.g., > eo.edi

Re: EOF inserts already existing M:N relationships/empty snapshot?!?

2016-09-21 Thread o...@ocs.cz
Tuesday, September 20, 2016 at 6:33 PM > To: Chuck Hill > Cc: "webobjects-dev@lists.apple.com WebObjects" > > Subject: Re: EOF inserts already existing M:N relationships/empty snapshot?!? > > Chuck, > > On 21.

Re: EOF inserts already existing M:N relationships/empty snapshot?!?

2016-09-20 Thread o...@ocs.cz
Just a quick followup -- sorry, forgot to copy/paste the 2nd part of the log, though I fear it would not help much — it just confirms the user's snapshot does not get changed either: > On 21. 9. 2016, at 2:40 AM, o...@ocs.cz wrote: > > Chuck, > >> On 20. 9. 2016,

Re: EOF inserts already existing M:N relationships/empty snapshot?!?

2016-09-20 Thread o...@ocs.cz
eird I use this settings for years and lots of M:N's, and this is the first time I have bumped into this kind of problems. Can you see what to check next? Thanks a very big lot, OC > > Also, this is 100% consistent, right? This is not a concurrency issue? > > Chuck > >

EOF inserts already existing M:N relationships/empty snapshot?!?

2016-09-20 Thread o...@ocs.cz
Hello there, I have a pretty common setup: entities User and DataBlock, an M:N relationship represented by an intermediate entity containing just the two keys, flattened on both sides. At both sides the relationships are appropriately flattened. Set to own destination+delete rule cascade. The

Re: derived attribute to sum a relationship?

2016-08-23 Thread o...@ocs.cz
Thanks a lot (Samuel too). > On 22. 8. 2016, at 8:29 PM, Chuck Hill wrote: ... > I can’t think of a way to do that that isn’t a lot of code and prone to > inconsistencies with the relationship data. Hmmm... is there at least some WO or WOnder trick, which would fetch at SQL-level a sum for rel

a unique object representative of an EO?

2016-06-21 Thread ocs.cz
Hello there, I would need an unique object representative of an EO. The object needs to be identical for all EO clones of all editing contexts. Such a _value_ representation would be the primary key or GID; but these, far as I know, ensure only isEqual for same EO, not ==. I need the identity -

a trick to model a complex derived relationship?

2016-03-01 Thread ocs.cz
Hello there, in my code, there is a number of “derived relationships”, defined by Java code at the EO class level. It works well for years, but now (as part of the “import another application's database” task I am working on) I would need to move the behaviour to the model level, so that I can

relationship count without fetching

2016-02-27 Thread ocs.cz
Hello there, I've got a page which lists a number of relationships; for each of them the user wants to see the number of objects, i.e., essentially something like this: === for - we got rel1 items show - we got rel2 items show ... === The first time this page gets display

import from an external DB

2016-02-21 Thread ocs.cz
Hello there, my web app should occassionally import from an external DB (a database created and maintained by another WO-based application). Just import, and only low-level dictionaries at that, never full-fledged EO-objects. Probably though, the imported tables would be rather big, it would be

Re: Back with weird problems: PK generation keeps generating same PK... up to a moment.

2015-05-19 Thread ocs.cz
Chuck, > On 19 5 2015, at 11:13 pm, Chuck Hill wrote: > >> Well then, what if I, at the moment any EO gets inserted into an EC, >> immediatelly called permanentGlobalID for it? > > The original problem was caused, as best I can call, by FrontBase vending the > same sequence number twice. Whi

Re: Back with weird problems: PK generation keeps generating same PK... up to a moment.

2015-05-17 Thread ocs.cz
Samuel, > On 14 5 2015, at 2:30 pm, Samuel Pelletier wrote: > > I just tested with my local FB 5.2.14 and it behave like oracle, the current > transaction state or setting does not affect the unique sequence, it always > increments and return the next value. > > OC, I suggest you upgrade your

Re: Back with weird problems: PK generation keeps generating same PK... up to a moment.

2015-05-17 Thread ocs.cz
Chuck, > On 14 5 2015, at 2:22 am, Chuck Hill wrote: > > FrontBase will “return” the sequence number if the transaction is rolled > back, but I am pretty sure that EOF does a commit immediately after selecting > for a PK. > > It is possible that somehow the commit after the PK select failed a

Re: Back with weird problems: PK generation keeps generating same PK... up to a moment.

2015-05-17 Thread ocs.cz
Samuel, > On 14 5 2015, at 2:12 am, Samuel Pelletier wrote: > I think your problem is with the locking. Optimistic locking does not lock > anything it check on commit if things have changed. Right; but does it potentially mess up PK generation? I thought it should not, but of course, as so oft