now : test List.set with state that throws NPE


Should not be NPE I think
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.093 sec <<< FAILURE!
testFoo(org.chromattic.docs.demo.shoppingcart.ShoppingCartTestCase)  Time elapsed: 7.359 sec  <<< ERROR!
java.lang.NullPointerException: Attempt to insert context EntityContext[state=ObjectStatus[status=TRANSIENT],mapper=EntityMapper[class=class org.chromattic.docs.demo.shoppingcart.ItemToPurchase,typeName=shop:itemtopurchase]] with no relative path to EntityContext[state=ObjectStatus[path=/julien,status=PERSISTENT],mapper=EntityMapper[class=class org.chromattic.docs.demo.shoppingcart.ShoppingCart,typeName=shop:shoppingcart]]
        at org.chromattic.core.DomainSessionImpl._persist(DomainSessionImpl.java:168)
        at org.chromattic.core.DomainSession.persist(DomainSession.java:406)
        at org.chromattic.core.EntityContext.addChild(EntityContext.java:238)
        at org.chromattic.core.EntityContext.addChild(EntityContext.java:228)
        at org.chromattic.core.mapper.onetomany.hierarchical.AnyChildList.add(AnyChildList.java:87)
        at java.util.AbstractList.add(AbstractList.java:91)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at org.chromattic.docs.demo.shoppingcart.ShoppingCartTestCase.testFoo(ShoppingCartTestCase.groovy:72)

- @NamingPrefix with @Properties


- collection mapping using JCR foo:* pattern

- split APT plugin into two jars, one for compile time and one for runtime

- auto generated IDs for Map<String, A> for one to many hierarchical

- @Rest integration : any chromattic object should also be rest enabled!!!

- @ManyToMany REFERENCE with list of reference values

- @OneToMany EMBEDDED with Map<Class<?>, Object> to provide access to mixins in a detyped manner
- copy operation (mixins, create notifications, etc...)
- !bug: PATH relationship with move are not preserved
- no mapper registered -> NPE during a findByPath
- Chromattic : Session : add getparent(Object o); / getChildren() / getPorperty() / detyped stuff
- Chromattic : @Properties only residual ?
- Chromattic : weak ref
- Chromattic : persist(Class, "") throws exception
- utiliser le portlet ID dans une portlet
- maybe remove save/close from the chromattic interface
- notion de REL LINK in associations
- better remove (no need for navigating everything, use prefix)!!!!
- @PrimaryType(name = "foo", mixinTypes = {Mixin.class})

- allow to force the backend JCR type to map a STRING to a PATH => remove @Path @Property

- map Enum on LONG in addition of STRING
- @Property(cascaded=true|false)
- Self-bounded type resolution
- detyped embedded access from session : <E> E session.getEmbedded(Object o, Class<E> embeddedClass)
- prefix the queries with the root path of the chromattic builder
- unwrap unit test : for now it's a CC / it should somehow test and throw another exception
- rework the encode/decode name : several stuff + allow object name decoder to return null and skip the child ?
- OneToMany with reference : move relationship
- OneToOne with several named children
- Make configurable the removal of a node with respect to the references
- transient / removed method invocations
- more control over session with @Save annotation ?
- Map<String, ?> property mapping like Map<String, Integer> or Map<String, String>
- spi for classloader integration
- create relationship with non persistent contexts
- detect mapped conflicts with collection, like if we add to a collection a node named by the another mapped by property then refuse it
- detect mix of 2 sessions
- test reference iterator remove
- test reference iterator concurrent modification exceptions
- pluggable simple types : annotated classes
- name mapping, for instance foo -> exo:foo
- type coercion unit testing
- undefined properties unit test for lists
- residual properties unit test for lists
- check underlying property type in relationships
- test for corrupted relationship
- clarify semantic of class importance in one to many map mapping : I.E do we expect class cast or non existence ???
- Map iterators on relationship for maximum efficiency and allow skip
- tester que les node type r�siduels ont la bonne property type

- a cache invalidation framework based on transforming node to object id + class

*** Patrice
- @Property(name="foo", default="bar") : Needed to initialize a property with a default value (in case it was no done in nodetype def)
- alternatively : @Initialize public <T> T someCustomMethod(T objectToInitialize) {// let me implement whatever logic I want to initialize my object with default values}
- <T> T Session.loadOrCreate(Class<T> clazz, String absPath) // tries to load an object from location "absPath" and initializes a new one if it does not exist (the parent location must exist)

*** crazy ideas

(patrice)
- @FindByPath to get a desendant from its relPath
- @FindByName to get a child by name
- enable write on @Name and @Path : this would move the node when persisting!
julien: I would rather do it as a collection move i.e
if you do
a.addChild(b);
c.addChild(b);
then the second operation would do a move to detach the node from a and attach it to c
