Hi. I'm developing an application that reads data from a local SQL Server 
database into the  app engine. 

Until now everything works fine. The problem I found so far is about the 
internationalization found on the mentioned local SQL Server with witch I'm 
struggling to replicate in the app engine.

The data in the local database is updated by the company employees and has 
the following structure:

Product table
--------------------
id
# other fields

Product_internationalization table
-------------------------------------------------
product_id
locale_id
internationalized_description
internationalized_price

I could only think of two solutions to replicate this in the app engine:

*First solution:*

Add a collection to the product properties like this:

public class Product{
private Long id;
private List<LocaleDescription> descriptions;
private List<LocalePrice> prices;
//Other fields

public String getDescription(){
//Check current locale
//Search and return String
}
} 

The problem with this solution is that the object product will get bigger 
as we add supported languages.

*Second solution:*

Create two objects: one that stores the product non internationalized 
properties and one that has the product as parent with 
the internationalized properties:

public class Product{
private Long id;
//Other fields
}

public class ProductInternationalization{
@Parent private Product parent;
private Locale locale;
private String description;
private double price;
}

The problem with this solutions is that I have to get another object based 
in the first object retrieved.

Is there any other way I'm not thinking?

The perfect solution would be to get in just one trip to the app engine the 
product with only the right language.

Also I can add that I'm using objectify with RequestFactory to access the 
datastore.

Thank you for your time.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to