google-code-export / twig-persist

Automatically exported from code.google.com/p/twig-persist
1 stars 1 forks source link

Issue with unitialized PrimitiveTypes #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
All un-iniitialized primitive types can't be converted to default values.
Twig is attempting to set null to boolean and int and is failing with an 
IllegalStateExcaption. 

See the attached test case.

thanks in advance!
Harsh

Original issue reported on code.google.com by harsh.je...@gmail.com on 24 May 2010 at 9:31

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by jdpatterson on 24 May 2010 at 1:55

GoogleCodeExporter commented 9 years ago
Thanks for the test case.  I have filled in the missing classes Profile, 
Address etc and run it against the latest 
in mercurial.

It all seems to work OK except for some assertions which are not related to 
this problem.

Can you make sure you are running against the latest source - Im updating the 
binaries this minute to 1.0.2 
... but my connection is very sloooow.

See my attached modified Test case that does not show the error you are getting.

Original comment by jdpatterson on 24 May 2010 at 3:07

Attachments:

GoogleCodeExporter commented 9 years ago
I am trying to build the new changes. But I get missing dependencies error. I 
am no 
expert with Maven neither would I claim working knowledge with it, but seems 
like I 
get an error due to missing dependencies with appengine libraries 1.3.4. I get:

Missing artifact com.google.appengine:appengine-api-1.0-sdk:jar:1.3.4:compile
Missing artifact com.google.appengine:appengine-api-labs:jar:1.3.4:compile
Missing artifact com.google.appengine:appengine-api-stubs:jar:1.3.4:test
Missing artifact com.google.appengine:appengine-api:jar:1.3.4:test
Missing artifact com.google.appengine:appengine-testing:jar:1.3.4:test

But I never faced this problem with your older version. I use eclipse + command 
line 
maven / m2 plugin.

thanks a ton!
Regards
Harsh

Original comment by harsh.je...@gmail.com on 24 May 2010 at 5:58

GoogleCodeExporter commented 9 years ago
I have been having problems committing the new mvn artifacts.  I'll update this 
issue when I finally manage to 
push the new jars.

Original comment by jdpatterson on 25 May 2010 at 1:47

GoogleCodeExporter commented 9 years ago
The mvn push has finally completed sucessfully.  Please try again now.  BTW, 
the binaries on the downloads page 
have also been updated.

Original comment by jdpatterson on 25 May 2010 at 4:16

GoogleCodeExporter commented 9 years ago
thanks a lot! In the meanwhile I manually downloaded the dependencies and could 
get 
the twig-1.0.2.jar built. Now I have the latest hot from the press :)

1. I still get an issue in line 233, 234.
com.vercer.engine.persist.standard.IndependantEntityTranslator 
propertiesToTypesafe
WARNING: No entity found for referenced key 
com_wulfpak_test_TestProfile$Addresses("fake_id")

Twig does not get Addresses. Do I have to store addresses separately. See 
commented 
lines 222 - 223. 

2. The defaulting of primitive types works well now. Was that a bug or was I 
missing 
something?

Thanks! 
Regards
Harsh

Original comment by harsh.je...@gmail.com on 25 May 2010 at 4:41

GoogleCodeExporter commented 9 years ago
Did you get a chance to look at 1? in comment 6? its currently a blocker for 
me. 
I am not sure if I have to store IndependentEntities separately.

thanks a ton!
Harsh

Original comment by harsh.je...@gmail.com on 27 May 2010 at 3:07

GoogleCodeExporter commented 9 years ago
I believe the problem is due to calling assoicate(loadedProfile).  This 
actually recursively associates all reachable 
instances with the new datastore - it tells the datastore "these instances are 
already persistent so never load or 
store them"

So when your test calls update(loadedProfile) the addresses are not stored.  
This is why they are not found and 
the test fails.

Original comment by jdpatterson on 27 May 2010 at 7:47

GoogleCodeExporter commented 9 years ago
thanks a lot!
You can now close this issue as well as 24!

Original comment by harsh.je...@gmail.com on 27 May 2010 at 1:01

GoogleCodeExporter commented 9 years ago

Original comment by jdpatterson on 27 May 2010 at 1:05