Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-22 Thread OC
Samuel, thanks for the advices! On 22. 1. 2015, at 17:35, Samuel Pelletier wrote: >> Precisely what I did. Works well, but is unacceptably slow (even if I cache >> unarchived dictionaries in Eos, fetching and unarchiving just the first >> time). > > If your dictionaries are stables and most

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-22 Thread Samuel Pelletier
OC, > >> 1- Store additional attributes in a serialized map structure (json, >> serialized php array, serialized java objects or property list). > > Precisely what I did. Works well, but is unacceptably slow (even if I cache > unarchived dictionaries in Eos, fetching and unarchiving just the

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-20 Thread Ramsey Gurley
I have postgres tables with millions of rows. Not BIG but not small either. Building an index on some of them takes minutes. Minutes where the table is locked. Depending on your db, adding a column can require a full table copy. Again, minutes unless you have some high end SSDs. I have this on

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-20 Thread Chuck Hill
On 2015-01-20, 3:51 AM, "OC" wrote: Chuck, On 14. 1. 2015, at 1:12, Chuck Hill mailto:ch...@gevityinc.com>> wrote: Yes, modifying the database seems a little dangerous here. Why should it be? Just concerns around locking, multiple instances, and multiple versions. You seem to have that in

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-20 Thread OC
Samuel, On 15. 1. 2015, at 14:49, Samuel Pelletier wrote: > 1- Store additional attributes in a serialized map structure (json, > serialized php array, serialized java objects or property list). Precisely what I did. Works well, but is unacceptably slow (even if I cache unarchived dictionari

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-20 Thread OC
Chuck, On 14. 1. 2015, at 1:12, Chuck Hill wrote: > Yes, modifying the database seems a little dangerous here. Why should it be? I probably am missing something of importance, but it seems to me the danger of, say, removing a column which really should have remained is exactly same as the (e

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-15 Thread Samuel Pelletier
Hi OC, I had to deal with similar situation in the past for online product catalog and I used these two way of storing the data successfully : 1- Store additional attributes in a serialized map structure (json, serialized php array, serialized java objects or property list). This allows to sto

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-13 Thread Chuck Hill
Yes, modifying the database seems a little dangerous here. Take a look at our Virtual Tables framework: http://www.global-village.net/chill/gvc_frameworks Chuck On 2015-01-13, 3:55 PM, "Ramsey Gurley" wrote: On Jan 13, 2015, at 8:26 AM, OC mailto:o...@ocs.cz>> wrote: Well the gist is that so

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-13 Thread Ramsey Gurley
On Jan 13, 2015, at 8:26 AM, OC wrote: > > Well the gist is that some of my EOs have (along with normal ones) a set of > user-defined attributes: the user can open an appripriate editor and set up > something like "my auction will, along with the attributes which the > application itself defi

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-13 Thread Paul Hoadley
On 14 Jan 2015, at 1:56 am, OC wrote: > On 13. 1. 2015, at 5:33, Paul Hoadley wrote: >> On 13 Jan 2015, at 12:06 pm, OC wrote: >>> Now I have re-readed the docs a couple of times, and it seems to me >>> (a) I have to mark different schemas as "versions"; >> >> It's really only conceptual. A "

followup: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-13 Thread OC
On 13. 1. 2015, at 16:26, OC wrote: > ... I believe I know that pretty well. My problems -- at the moment at least > -- are > > (a) sometimes (so far in one sole case, which is luckily harmless, but I fear > future) the EOAdaptorChannel describeModelWithTableNames API does not read > the cur

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-13 Thread OC
Paul, On 13. 1. 2015, at 5:33, Paul Hoadley wrote: > On 13 Jan 2015, at 12:06 pm, OC wrote: >> Now I have re-readed the docs a couple of times, and it seems to me >> (a) I have to mark different schemas as "versions"; > > It's really only conceptual. A "version" is just a "change to the model

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-12 Thread Paul Hoadley
On 13 Jan 2015, at 12:06 pm, OC wrote: > Now I have re-readed the docs a couple of times, and it seems to me > > (a) I have to mark different schemas as "versions"; It's really only conceptual. A "version" is just a "change to the model which I'm going to need to reflect in the database at th

Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

2015-01-12 Thread OC
Paul, Chuck, Theodore, Timothy, and others, On 13. 1. 2015, at 1:02, Paul Hoadley wrote: >> But after first going through I am none the smarter and it does not seem to >> me it would help. Perhaps I am completely missing the point, but seems to me >> this is intended to a completely different t

Re: Migrations (was: ERXSQLHelper)

2015-01-12 Thread Paul Hoadley
On 13 Jan 2015, at 10:16 am, OC wrote: > But after first going through I am none the smarter and it does not seem to > me it would help. Perhaps I am completely missing the point, but seems to me > this is intended to a completely different task than the one of mine? It might be just solving t

Migrations (was: ERXSQLHelper)

2015-01-12 Thread OC
Chuck, On 13. 1. 2015, at 0:37, Chuck Hill wrote: >> Can you please point me to some howto? To be frank, I have absolutely no >> idea what “migration” is. (Truth is, I must be missing something pretty >> obvious at the documentation side: whilst I can find my way in WOnder if I >> know what e

Re: ERXSQLHelper

2015-01-12 Thread Paul Hoadley
On 13 Jan 2015, at 10:01 am, OC wrote: >> Just my 2¢, but instead of that large block of code, why not just change >> some properties, run migrations at app startup, and declare your changes >> there? Migrations work and you don’t have to reinvent the wheel. Then, if >> your SQL continues to b

Re: ERXSQLHelper

2015-01-12 Thread Theodore Petrosky
12. 1. 2015, at 23:59, Timothy Worman wrote: > > I don’t know how far you’ve dug - but just in case I’ll throw this out. One > of the keys to how all this works is ERXSQLHelper sqlHelper = > ERXSQLHelper.newSQLHelper. This returns the vendor specific ERXSQLHelper for > your d

Re: ERXSQLHelper

2015-01-12 Thread Chuck Hill
On 2015-01-12, 3:31 PM, "OC" wrote: Tim, On 12. 1. 2015, at 23:59, Timothy Worman mailto:li...@thetimmy.com>> wrote: I don’t know how far you’ve dug - but just in case I’ll throw this out. One of the keys to how all this works is ERXSQLHelper sqlHelper = ERXSQLHelper.ne

Re: ERXSQLHelper

2015-01-12 Thread OC
Tim, On 12. 1. 2015, at 23:59, Timothy Worman wrote: > I don’t know how far you’ve dug - but just in case I’ll throw this out. One > of the keys to how all this works is ERXSQLHelper sqlHelper = > ERXSQLHelper.newSQLHelper. This returns the vendor specific ERXSQLHelper for > y

Re: ERXSQLHelper

2015-01-12 Thread Timothy Worman
OC: I don’t know how far you’ve dug - but just in case I’ll throw this out. One of the keys to how all this works is ERXSQLHelper sqlHelper = ERXSQLHelper.newSQLHelper. This returns the vendor specific ERXSQLHelper for your database (Frontbase). DB specific code is there. You might want to

Re: ERXSQLHelper

2015-01-12 Thread OC
P.S. my current environment is Groovy 2.3.8 / WebObjects 5.4.3 / ERExtensions 6.1.2-SNAPSHOT / Java 1.7.0_13 / Mac OS X 10.8.5 / FrontBase 7.2 On 12. 1. 2015, at 22:56, OC wrote: > Theodore, > > On 12. 1. 2015, at 19:00, Theodore Petrosky wrote: >> have you looked at the migrations? >> ERXM

Re: ERXSQLHelper

2015-01-12 Thread OC
Theodore, On 12. 1. 2015, at 19:00, Theodore Petrosky wrote: > have you looked at the migrations? > ERXMigrationTable personTable = database.existingTableNamed("person"); > personTable.existingColumnNamed("Foo").renameTo("Bar”); > personTable.newStringColumn(name, width, allowsNull) well... the

Re: ERXSQLHelper

2015-01-12 Thread Theodore Petrosky
5, at 12:51 PM, OC wrote: > Hello there, > > I need to generate add (and later also rename/drop) column SQL commands for > given EOAttributes, like e.g., > > ALTER TABLE "T_FOO" ADD COLUMN "C_BAR" VARCHAR(256); > > etc. So far, I haven't succeeded t

ERXSQLHelper

2015-01-12 Thread OC
Hello there, I need to generate add (and later also rename/drop) column SQL commands for given EOAttributes, like e.g., ALTER TABLE "T_FOO" ADD COLUMN "C_BAR" VARCHAR(256); etc. So far, I haven't succeeded to find appropriate service in ERXSQLHelper (nor elsewhere)

Changes to PostgreSQL unique constraint handling in ERXSQLHelper

2012-11-18 Thread Paul Hoadley
containing an ERXValidationException. I assume this is related to your commit here: --- commit a3d8ae17480f04ff5b517c82fc3c864975c3af66 Author: nullterminated Date: Thu Jun 7 21:33:44 2012 -0700 Add unique constraint handling to ERXSQLHelper for postgresql. --- (Until recently, the

Re: Postgresql and ERXSQLHelper

2012-03-19 Thread Michael Gargano
ne and it > generates "0=1" as it should through ERXSQLHelper. On the headless app, > however, this fails stating that the PostgreSQLPlugIn doesn't support > generation of ERXFalseQualifier. While carefully stepping through this ball > of confusion I noticed that t

Postgresql and ERXSQLHelper

2012-03-16 Thread Michael Gargano
rk an ERXFalseQualifier is used. In the regular wonder app this works fine and it generates "0=1" as it should through ERXSQLHelper. On the headless app, however, this fails stating that the PostgreSQLPlugIn doesn't support generation of ERXFalseQualifier. While carefully stepping