Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
Hi Paul, derived attributes are computed by the database and thus those values are only updated when an eo is fetched into memory. In your case you are creating a new eo that has NULL for these attributes and as long as WO uses that eo or its snapshot cache those values will be still NULL. You have to refetch the eo to update the derived attributes. jw Am 03.10.2012 um 07:23 schrieb Paul Hoadley pa...@logicsquad.net: Hello, Just digging up this 2.5 year old thread... On 18/04/2010, at 4:12 PM, Kieran Kelleher wrote: Alternative suggestion: A readonly derived column is another option to expose the PK. The advantage is that the the new exposed column can be used in standard EOQualifier that works in memory and for schema-based qualifiers. Assuming your primary key col is named pk and you want an attribute named jobcode that exposes the pk... attribute: jobcode derived: √ read-only: √ definition: (pk) [Note: if mapping a column name to a derived attribute, you must surround it in brackets, otherwise EOF cannot parse it] I'm doing this in a model to expose the PK, as described. I have a D2W application that creates a new entity and saves it. Returning to the list page, the derived attribute shows _no value_ (the accessor returns null), even though the saved row is visible in the database, and obviously has a primary key. Logging out and back in does not fix this, though an app restart does—clearly not ideal for production. Is this expected, and thus should I be looking at modelling it some other way? (As an aside, last time I looked at this was a few months ago, and I swear it was behaving properly then—i.e., that the derived attribute was immediately visible.) Or have I more likely botched something? -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
Hi Johann, On 03/10/2012, at 5:26 PM, Johann Werner wrote: derived attributes are computed by the database and thus those values are only updated when an eo is fetched into memory. In your case you are creating a new eo that has NULL for these attributes and as long as WO uses that eo or its snapshot cache those values will be still NULL. You have to refetch the eo to update the derived attributes. Thanks for the explanation. Looks like a derived attribute is not the solution for this use case, then. I wrote: (As an aside, last time I looked at this was a few months ago, and I swear it was behaving properly then—i.e., that the derived attribute was immediately visible.) Clearly I imagined that. -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
Hi Paul, FWIW, I made a small change to ERXGenericRecord (integration branch) recently that allows valueForKey( primaryKeyAttributeName ) to read the PK value using id or whatever you use for PK field names to be used. This was to allow a fetch qualifier qualified on the primary key attribute to be used in both fetchspecs and in-memory qualification. That might be a solution for what you are trying to achieve while avoiding the derived attribute altogether. -Kieran On Oct 3, 2012, at 4:34 AM, Paul Hoadley pa...@logicsquad.net wrote: Hi Johann, On 03/10/2012, at 5:26 PM, Johann Werner wrote: derived attributes are computed by the database and thus those values are only updated when an eo is fetched into memory. In your case you are creating a new eo that has NULL for these attributes and as long as WO uses that eo or its snapshot cache those values will be still NULL. You have to refetch the eo to update the derived attributes. Thanks for the explanation. Looks like a derived attribute is not the solution for this use case, then. I wrote: (As an aside, last time I looked at this was a few months ago, and I swear it was behaving properly then—i.e., that the derived attribute was immediately visible.) Clearly I imagined that. -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com This email sent to kelleh...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RE: Localizable.strings
Hi David,It's a wonder application.Not a D2W. Saludos, Oscar. CC: webobjects-dev@lists.apple.com From: programming...@mac.com Subject: Re: Localizable.strings Date: Tue, 2 Oct 2012 16:45:06 -0700 To: racso...@hotmail.com D2W? If so what are your rules? Sent from my iPad On 2012-10-02, at 3:07 PM, Oscar González racso...@hotmail.com wrote: Hi all,I try it but no luck.I have in my ValidationTemplate.stringsMgeProductor_Existe = Ya existe un @@displayNameForEntity@@ con el mismo @@displayNameForProperty@@; And in my Localizable.stringsMgeProductor.codigoInterno = código;Entity.MgeProductor = Productor; And the message for the validation saysYa existe un Mge Productor con el mismo código. I want it to sayYa existe un Productor con el mismo código. Saludos, Oscar. CC: webobjects-dev@lists.apple.com From: programming...@me.com Subject: Re: Localizable.strings Date: Tue, 2 Oct 2012 14:47:28 -0700 To: racso...@hotmail.com I'm away from my computer but I think it's Entity.MgeProductor = Sent from my iPad On 2012-10-02, at 2:20 PM, Oscar González racso...@hotmail.com wrote: Hi all,I'm starting with localizables. I need to localizable a entity name MgeProductor. I try with this.{ MgeProductor = Productor; EntityKey.MgeProductor = Productor; Entity.name.MgeProductor = Productor;} Non of this work for me. Saludos, Oscar. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
Or just make it a class property. Some people find that offensive, but it won't cause problems for EOF. Exposed FK does cause problems. Chuck On 2012-10-03, at 1:34 AM, Paul Hoadley wrote: Hi Johann, On 03/10/2012, at 5:26 PM, Johann Werner wrote: derived attributes are computed by the database and thus those values are only updated when an eo is fetched into memory. In your case you are creating a new eo that has NULL for these attributes and as long as WO uses that eo or its snapshot cache those values will be still NULL. You have to refetch the eo to update the derived attributes. Thanks for the explanation. Looks like a derived attribute is not the solution for this use case, then. I wrote: (As an aside, last time I looked at this was a few months ago, and I swear it was behaving properly then—i.e., that the derived attribute was immediately visible.) Clearly I imagined that. -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/practical_webobjects Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RE: Localizable.strings [Solved]
Thanks David for your help, The way it works.MgeProductor.MgeProductor = Productor; If you want to localize an entity nameyourEntityName.yourEntityname = something; Thanks, Oscar. From: racso...@hotmail.com To: programming...@mac.com Subject: RE: Localizable.strings Date: Wed, 3 Oct 2012 08:15:07 -0600 CC: webobjects-dev@lists.apple.com Hi David,It's a wonder application.Not a D2W. Saludos, Oscar. CC: webobjects-dev@lists.apple.com From: programming...@mac.com Subject: Re: Localizable.strings Date: Tue, 2 Oct 2012 16:45:06 -0700 To: racso...@hotmail.com D2W? If so what are your rules? Sent from my iPad On 2012-10-02, at 3:07 PM, Oscar González racso...@hotmail.com wrote: Hi all,I try it but no luck.I have in my ValidationTemplate.stringsMgeProductor_Existe = Ya existe un @@displayNameForEntity@@ con el mismo @@displayNameForProperty@@; And in my Localizable.stringsMgeProductor.codigoInterno = código;Entity.MgeProductor = Productor; And the message for the validation saysYa existe un Mge Productor con el mismo código. I want it to sayYa existe un Productor con el mismo código. Saludos, Oscar. CC: webobjects-dev@lists.apple.com From: programming...@me.com Subject: Re: Localizable.strings Date: Tue, 2 Oct 2012 14:47:28 -0700 To: racso...@hotmail.com I'm away from my computer but I think it's Entity.MgeProductor = Sent from my iPad On 2012-10-02, at 2:20 PM, Oscar González racso...@hotmail.com wrote: Hi all,I'm starting with localizables. I need to localizable a entity name MgeProductor. I try with this.{ MgeProductor = Productor; EntityKey.MgeProductor = Productor; Entity.name.MgeProductor = Productor;} Non of this work for me. Saludos, Oscar. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/racso_gp%40hotmail.com This email sent to racso...@hotmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Jenkins and SVN+SSH
Le 2012-10-02 à 18:02, Roger Perryman ro...@xeotech.com a écrit : The following is just an update in case anyone stumbles upon this same problem. Not really a full solution but perhaps useful none the less. I was not able to get SVN+SSH in Jenkins to work on an OSX 10.6.7 system that otherwise can access the repository via command line and Eclipse. If I manually import the project it works fine but the defeats the purpose. I decided to upgrade Hudson to Jenkins on the original build server (OSX 10.5.8) that was throwing IndexOutOfBoundsExceptions, even though the actual compile was successful. I shut down Hudson (it was manually launched) and then installed Jenkins using the OSX package (as I did on the 10.6.7 system). I then created a test job and it worked fine. Then I created a simple test project and manually copied it into Jenkins. It worked fine. Next I added a project that was in SVN and configured it to use svn+ssh, entering my user name and supplying the private key (id_dsa). It worked the first time. I then entered the remaining jobs from the Hudson install into Jenkins. Everything _appeared_ to work. However, I am noticing that one of the projects fails to build because it cannot find some symbols from an included framework. These changes are new but they do show up in the Jenkins workspace for that framework. What I noticed is that the build.xml file in the referenced framework is different in the Jenkins version than it is in the Eclipse version. All the other projects have identical build.xml files. I've removed all of the build output but it doesn't seem to make a difference. Not sure where else to check. Another problem that I am having (on a separate project that does build successfully) is Archiving the artifacts. I've set up the post-build action using the config files from Hudson version (where it worked). It complains that the dist folder doesn't exist. Creating it did not solve the problem. There must be a part that I am missing that compresses the build output and copies it to the dist folder. In the files to archive field, I have XeoMed/dist/*.tar.gz. I want to get this step working before exploring the Publish over SSH plugin to automate pushing the build tarballs over to the deployment server. I will still manually install them but it should be a matter of just expanding a few files. Does anyone have a working example for this scenario? I don't have an answer for your problem, but for the Publish over SSH part, you can have a look at my wodeploy.pl script that will ship the archive of the app (and the archive of web server resources), decompress it, moving it to the correct location and restarting the app (or adding it to Monitor if the application don't exist). Thanks. On Sep 28, 2012, at 5:27 PM, Maik Musall wrote: Am 28.09.2012 um 22:36 schrieb Roger Perryman ro...@xeotech.com: But the auth method would more likely involve not supplying your private key somewhere, but add the public key of the user jenkins is running under to the authorized_keys on the svn server. Did you do that? I submitted before fully answering the question. I generated a key (DSA) and placed the public key in authorized_keys2 on the server. This works AS ME. I supplied the private key to Jenkins so that it could establish a handshake with the server. I may need to add a Jenkins user on the SVN server otherwise, if I get this to work, I would get all the credit (or blame) for any activity from the build server. I think I have to let someone answer that who has experience specifically with svn+ssh on Jenkins... Maik ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
On 03/10/2012, at 10:10 PM, Kieran Kelleher wrote: FWIW, I made a small change to ERXGenericRecord (integration branch) recently that allows valueForKey( primaryKeyAttributeName ) to read the PK value using id or whatever you use for PK field names to be used. This was to allow a fetch qualifier qualified on the primary key attribute to be used in both fetchspecs and in-memory qualification. That might be a solution for what you are trying to achieve while avoiding the derived attribute altogether. Thanks Kieran, I'll take a look. -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
Hi Chuck, On 04/10/2012, at 1:53 AM, Chuck Hill wrote: Or just make it a class property. Some people find that offensive, but it won't cause problems for EOF. Exposed FK does cause problems. I'm not one of those people, and I did consider that. What I've done instead is used the opportunity to look at ERXSequence and NativeDatabaseSequence in particular. This is one of those perennial invoice number situations, where all I really need is an increasing integer sequence. Integer primary key fit that bill, and I was happy to double up on it, but I'll probably use an additional native database sequence instead. -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
On 2012-10-03, at 2:09 PM, Paul Hoadley wrote: Hi Chuck, On 04/10/2012, at 1:53 AM, Chuck Hill wrote: Or just make it a class property. Some people find that offensive, but it won't cause problems for EOF. Exposed FK does cause problems. I'm not one of those people, and I did consider that. What I've done instead is used the opportunity to look at ERXSequence and NativeDatabaseSequence in particular. This is one of those perennial invoice number situations, where all I really need is an increasing integer sequence. Integer primary key fit that bill, and I was happy to double up on it, but I'll probably use an additional native database sequence instead. I would NOT be in favour using the PK as in invoice number. That IS offensive! :-P The PKs generated by EOF are not guaranteed to be an unbroken sequence. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/practical_webobjects Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
On 04/10/2012, at 6:45 AM, Chuck Hill wrote: I'm not one of those people, and I did consider that. What I've done instead is used the opportunity to look at ERXSequence and NativeDatabaseSequence in particular. This is one of those perennial invoice number situations, where all I really need is an increasing integer sequence. Integer primary key fit that bill, and I was happy to double up on it, but I'll probably use an additional native database sequence instead. I would NOT be in favour using the PK as in invoice number. That IS offensive! :-P Heh. I guess it depends on your requirements for an invoice number. The PKs generated by EOF are not guaranteed to be an unbroken sequence. No, but they're guaranteed to be unique, which would be sufficient—for me, anyway. If the _unbroken_ sequence (by which I assume you mean no numbers missing) is important, then you'd need something more sophisticated than a native database sequence anyway, wouldn't you? Say I generate an invoice which I need to scrap—it has too many mistakes in it, and it's easier to delete than edit. Then I've lost that number in the sequence and can't get it back. So, what's your beef with sparse sequences for invoice numbers (some local tax/legal issue?), and just out of interest, how would you solve the problem then? -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
On 2012-10-03, at 3:50 PM, Paul Hoadley wrote: On 04/10/2012, at 6:45 AM, Chuck Hill wrote: I'm not one of those people, and I did consider that. What I've done instead is used the opportunity to look at ERXSequence and NativeDatabaseSequence in particular. This is one of those perennial invoice number situations, where all I really need is an increasing integer sequence. Integer primary key fit that bill, and I was happy to double up on it, but I'll probably use an additional native database sequence instead. I would NOT be in favour using the PK as in invoice number. That IS offensive! :-P Heh. I guess it depends on your requirements for an invoice number. I just object to the use of the PK for a piece of data that has meaning to the user. Sooner or later they want to edit it or control it. I want them to start with 2013 next year The PKs generated by EOF are not guaranteed to be an unbroken sequence. No, but they're guaranteed to be unique, which would be sufficient—for me, anyway. If the _unbroken_ sequence (by which I assume you mean no numbers missing) is important, then you'd need something more sophisticated than a native database sequence anyway, wouldn't you? Yes! Say I generate an invoice which I need to scrap—it has too many mistakes in it, and it's easier to delete than edit. Then I've lost that number in the sequence and can't get it back. Exactly the issue. So, what's your beef with sparse sequences for invoice numbers (some local tax/legal issue?), and just out of interest, how would you solve the problem then? I have run into that requirement before. IIRC from someone who was used to a paper system were every invoice was kept, voided or not. It is a tricky thing to solve with EOF. An ON INSERT trigger would be one way. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/practical_webobjects Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Derived read-only attribute to expose PK [Was: Re: postgresql serial columns and wonder]
On 04/10/2012, at 8:25 AM, Chuck Hill wrote: I would NOT be in favour using the PK as in invoice number. That IS offensive! :-P Heh. I guess it depends on your requirements for an invoice number. I just object to the use of the PK for a piece of data that has meaning to the user. Sooner or later they want to edit it or control it. I want them to start with 2013 next year Yeah, OK. I'll be able to maintain control of the system I'm working on here, and the answer to that would be No. But point taken. So, what's your beef with sparse sequences for invoice numbers (some local tax/legal issue?), and just out of interest, how would you solve the problem then? I have run into that requirement before. IIRC from someone who was used to a paper system were every invoice was kept, voided or not. Fair enough—we're talking about different requirements. What I need here is just an immutable, system-generated serial number. In any case, I ended up using ERXSequence.NativeDatabaseSequence on top of a PostgreSQL sequence. So no PKs were harmed. :-) It is a tricky thing to solve with EOF. An ON INSERT trigger would be one way. Ah yes, I remember you proposing that in a past thread on the topic. -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com