• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: simpleblog migration problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simpleblog migration problem


  • Subject: Re: simpleblog migration problem
  • From: Pascal Robert <email@hidden>
  • Date: Thu, 12 Jan 2012 08:18:34 -0500

It worked well for FrontBase and H2, but I guess it should use EOF to create the role instead of using SQL.

> Interesting, I downloaded, imported the source, and switched the database to postgresql. I could not add another 'role' because of a pk violation.
>
> when i examined the tables I found that the role_seq listed a last_value of 1. it should have been 2. so I did a:
>
> select setval('role_seq', 2);
>
> and voila, I can create roles.
>
> the error was in the migrations (for postgresql)
> ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "INSERT INTO Role (roleDescription, id) VALUES ('Admin', 1)", true);
>
> when you specify the id's value, it prevents the value from incrementing the sequence. so either remove the explicit id or do the setval.
>
> ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "INSERT INTO Role (roleDescription) VALUES ('Admin')", true);
>
> I don't know the implications for other databases.
>
> Ted
>
> --- On Thu, 12/15/11, David Holt <email@hidden> wrote:
>
>> From: David Holt <email@hidden>
>> Subject: Re: stumbling around with D2W
>> To: "Theodore Petrosky" <email@hidden>
>> Cc: "Ramsey Gurley" <email@hidden>, email@hidden
>> Date: Thursday, December 15, 2011, 12:25 PM
>> This example is in the SimpleBlog
>> rules for assigning roles to a Person with checkboxes. It's
>> not exactly the same as you've asked for, but it was handy
>> :-)
>>
>> https://github.com/daveeed/SimpleBlog
>>
>> 50 : (task = 'edit' and entity.name = 'Person' and
>> propertyKey = 'roles') => toManyUIStyle = "checkbox"
>> [com.webobjects.directtoweb.Assignment]
>> 80 : (task = 'edit' and entity.name = 'Person' and
>> propertyKey = 'roles') => componentName =
>> "ERD2WEditToManyRelationship"
>> [com.webobjects.directtoweb.Assignment]
>> 100 : (entity.name = 'Person' and propertyKey = 'roles')
>> => keyWhenRelationship = "roleDescription"
>> [com.webobjects.directtoweb.Assignment]
>>
>> The propertyKey 'roles' could be a relationship or a method
>> such as that you have below on your EmploymentTitle EO.
>>
>> David
>>
>>
>> On 2011-12-15, at 8:41 AM, Theodore Petrosky wrote:
>>
>>> Is there an example out there? I feel totally lost, I
>> don't understand where to begin.
>>>
>>> I hesitate asking for this kind of low level help.
>>>
>>> I feel like a fish out of water.
>>>
>>> Ted
>>>
>>> --- On Thu, 12/15/11, Ramsey Gurley <email@hidden>
>> wrote:
>>>
>>>> From: Ramsey Gurley <email@hidden>
>>>> Subject: Re: stumbling around with D2W
>>>> To: "Theodore Petrosky" <email@hidden>
>>>> Cc: email@hidden
>>>> Date: Thursday, December 15, 2011, 10:28 AM
>>>> Hi Ted,
>>>>
>>>> componentName = ERD2WEditToOneRelationship
>>>> restrictedChoiceKey = object.currentTitles
>>>>
>>>> Then create a method on your object returning an
>> array of
>>>> current employment titles like you have below.
>>>>
>>>> Ramsey
>>>>
>>>> On Dec 15, 2011, at 8:03 AM, Theodore Petrosky
>> wrote:
>>>>
>>>>> OK so this is a real newbie thing.
>>>>>
>>>>> In my Wonder app, I would:
>>>>>
>>>>> create a list of entries to populate a popup
>>>>>
>>>>> employmentTitleList =
>>>>
>> EmploymentTitle.fetchEmploymentTitles(newEmployeeEC,
>>>> EmploymentTitle.IS_CURRENT.eq(true),
>>>> EmploymentTitle.ORDERING_INT.ascs());
>>>>>
>>>>> I don't understand how to do this in an Edit
>> page in
>>>> D2W.
>>>>>
>>>>> Is there anything like this in an example?
>>>>>
>>>>> Ted
>>>>>
>> _______________________________________________
>>>>> Do not post admin requests to the list. They
>> will be
>>>> ignored.
>>>>> Webobjects-dev mailing list
>>   (email@hidden)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>
>>>>> This email sent to email@hidden
>>>>
>>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be
>> ignored.
>>> Webobjects-dev mailing list      (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >simpleblog migration problem (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Unnecessary method calls during loading a page
  • Next by Date: Re: Unnecessary method calls during loading a page
  • Previous by thread: simpleblog migration problem
  • Next by thread: d2w set the UI of a ERD2WEditToOneRelationship
  • Index(es):
    • Date
    • Thread