• 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
n00b EO questions :-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

n00b EO questions :-)


  • Subject: n00b EO questions :-)
  • From: Rams <email@hidden>
  • Date: Thu, 22 May 2008 22:50:37 -0400

Hi Everyone,

Please pardon me if I am asking extremely stupid questions, but I'm starting to do some work with my database and I have a few questions about EnterpriseObjects and database things in general...  

The first question is about creating unique data... I have a user object and I need unique usernames for obvious reasons.  Now, I know it is unlikely, but let's say that two visitors attempt to create a user at the same time and they happen to pick the same username.

EOQualifier qualifier = User.SCREEN_NAME.eq(username);
if(User.fetchUser(ec, qualifier) == null) {
User.createUser(ec, email, password, username);
ec.saveChanges();
}

If these fired at the same time, is it possible that two users with the same username could be created?  If so, does anyone have any pointers to prevent duplicate data?


The second question regards security/sql injection.  Is there any sort of user input I should be on the lookout for in my validateUsername method?  Like username "admin'--"  or some such?  I assume that as long as I stick to EOQualifiers and don't touch the SQL myself that all the input will be properly escaped...


Finally, third question... I'm using MySQL.  I will ensure InnoDB is used by default as mentioned here:

http://homepage.mac.com/kelleherk/iblog/C711669388/E20070719095201/index.html

Is there anything else I need to do in order to produce ACID transactions with WO?  It doesn't hurt to be buzzword compliant you know ;-)


Thanks everybody!  I really appreciate the help everyone here provides.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: n00b EO questions :-)
      • From: Kieran Kelleher <email@hidden>
    • Re: n00b EO questions :-)
      • From: Q <email@hidden>
    • Re: n00b EO questions :-)
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: WOLips : Display Group Component ?
  • Next by Date: Re: n00b EO questions :-)
  • Previous by thread: Re: WOLips : Display Group Component ?
  • Next by thread: Re: n00b EO questions :-)
  • Index(es):
    • Date
    • Thread