[appengine-java] add a new INT-type @Persistent to a existing talbe

2010-02-03 Thread Love Yao
my demo

fist,
public class CommentTheme {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent
private String theme;

 }
then
   for (int i = 20; i > 0; i--) {
CommentTheme commentTheme = new CommentTheme(i+"")
 persistenceManager.makePersistent(commentTheme);
}

now all is OK,but when I add

@Persistent
private int themeCount;

to the class CommentTheme ,the system tell me the themeCount should
not be null,but
if i add
   @Persistent
private String themeCount;
all thing is OK


so What is the problem! even if i add a default value to the  nt
themeCount ,my app is also Wrong !   WHy

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] About LocalDatastoreServiceTestConfig

2010-05-20 Thread Love Yao
the docs:

  Config for accessing the local datastore service in tests.
Default behavior is to configure thelocal datastore to only store
data in-memory and not write anything to disk. tearDown() wipes out
all in-memory state so that the datastore is empty at the end of every
test.

yes,but i want  the datastore IS NOT empty at the end of every
test.
so I code:

  LocalDatastoreServiceTestConfig serviceTestConfig
=newLocalDatastoreServiceTestConfig();
 serviceTestConfig.setNoStorage(false);
 serviceTestConfig.setNoIndexAutoGen(false);

and When I test " pm.makePersistent(ob);" the local_db.bin appear!
but there being no data in it, for I  code:
pm.newQuery(Ob.class).execute(); the size of the List is 0.

   and then I add "serviceTestConfig.setStoreDelayMs(1);"  and then
ervey time I  makePersistent(ob),there will being data in my
local_db.bin ,for i can query it!!

   So I want to know Why will this happen, or  I think the docs should
'alert' it!




-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: About LocalDatastoreServiceTestConfig

2010-05-21 Thread Love Yao
Yes.
 I try setStoreDelayMs(1000)
 all data gone!



On May 21, 3:25 pm, bufferings  wrote:
> Hi LoveYao
>
> I think this is strange, too.
>
> The setStoreDelayMs(1) leaves the data in the file,
> and the setStoreDelayMs(1000) clears the data.
>
> Why don't you submit an 
> issue?http://code.google.com/p/googleappengine/issues/list
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Problem in Serializing ArrayList - JDO- GWT - GAE/J

2010-05-23 Thread Love Yao
 first YOU make your BO and DTO one class,I do not think it is a good
idea

 and  org.datanucleus.sco.backed.ArrayList?

 try to use Java,util.*

On May 23, 7:03 pm, "mklarm...@googlemail.com"
 wrote:
> i am having the same issue here.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Love Yao wants to chat

2011-06-29 Thread Love Yao
---

Love Yao wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-b0c4b49ec3-fa4e9ecfc6-e-SR4LxENUHBYkPjANs5OIWWJFs
You'll need to click this link to be able to chat with Love Yao.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Love Yao, visit:
http://mail.google.com/mail/a-b0c4b49ec3-fa4e9ecfc6-e-SR4LxENUHBYkPjANs5OIWWJFs

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Cannot to read the file under /WEB-INF/classes/

2011-07-16 Thread Love Yao
I want to read the config.xml in my  webRoot /WEB-INF/classes/
config.xml.

All is OK in localhost.

but when deploying to GAE, it cannot find the xml:

/base/data/home/apps/mainloveplay/4.35187093106408/base/data/home/
apps/mainloveplay/4.35187093106408/WEB-INF/classes/config.xml (No
such file or directory)


the code to get path is:

String rootPath =
ConfigRepository.class.getResource("/").getPath().substring(1);
Document document = reader.read(new File(rootPath + "config.xml"));

so how can I get my config.xml




-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.