message.DbException.getJdbcSQLException(DbException.java:316)
>>>
>> I will try to find the problem!
>>
>>
> I've found the problem. I was using:
> userUpdated.getRoles().remove(roleADMIN);
>
> instead of
>
> userUpdated.removeFromRoles(ro
>>
> I will try to find the problem!
>
>
I've found the problem. I was using:
userUpdated.getRoles().remove(roleADMIN);
instead of
userUpdated.removeFromRoles(roleADMIN);
So, can't I use those LIST methods with Cayenne? Just the Cayenne one!
Thanks a lot, Robert.
Rega
r, who is associated with the default role;
> b/c of cascade rule, default role is deleted. Default role is associated
> with all users; because of cascade rule, all users are deleted. Because
> of cascade rule, any additional roles (admin) associated with users are
> /also/ delet
SWORD, t0.VERSION FROM
>> SHIRO_USER t0 WHERE t0.ID = ? [bind: 1->ID:-2]
>> 2010-09-29 14:32:41,920 INFO [org.apache.cayenne.access.QueryLogger] - ===
>> returned 0 rows. - took 1 ms.
>> 2010-09-29 14:32:41,920 INFO [org.apache.cayenne.access.QueryLogger] - +++
>> transaction committed.
>> Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.584 sec
>> <<< FAILURE!
>>
>> Results :
>>
>> Tests in error:
>>
>> testAddUserRole(com.google.constructor.extras.security.shiro.cayenne.UserCayenneTest)
>>
>>
>
> Is there anything wrong with my configuration?
> You can try it just checking out the project[2] (Apache License 2.0):
> svn checkout
> http://construtor.googlecode.com/svn/trunk/click-orm-integration coi
> cd coi/orm
> mvn sql:execute ---> will create a H2 database in the data folder
> mvn clean test -Dtest=UserCayenneTest
>
> It is a multi-module maven project:
>
> # orm/ ===> JPA and Cayenne implementation of IService
> ===> ShiroJPARealm a little implementation of
> Shiro framework (used on rolesecurity module example)
> ===> ShiroCayenneRealm a little implementation
> of Shiro framework (doesn't have module example, just test for now)
> # rolesecurity/ ===> rolesecurity module example showing how to setup
> Apache Shiro with click and demonstrate the ShiroJPARealm use.
>
> Hope someone has time to take a look on it.
>
>
> Regards,
>
> Gilberto
>
> PS: Why does cayenne not do a rollback when occurs an exception? See the the
> comment test method in the UserCayenneTest class.
>
> [1]http://dl.dropbox.com/u/9093640/ObjRelationshipInspector2.png
> [2]http://code.google.com/p/construtor/
>
> --
> View this message in context:
> http://cayenne.195.n3.nabble.com/many-to-many-relation-tp3491p1603892.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
oogle.constructor.extras.security.shiro.cayenne.UserCayenneTest)
>
>
Is there anything wrong with my configuration?
You can try it just checking out the project[2] (Apache License 2.0):
svn checkout
http://construtor.googlecode.com/svn/trunk/click-orm-integration coi
cd coi/orm
mvn sq
e.195.n3.nabble.com/many-to-many-relation-tp3491p1575177.html
Sent from the Cayenne - User mailing list archive at Nabble.com.
ne help?
Regards,
Gilberto
[1]http://cayenne.apache.org/doc12/cayennemodeler-flattened-relationships.html
--
View this message in context:
http://cayenne.195.n3.nabble.com/many-to-many-relation-tp3491p1570367.html
Sent from the Cayenne - User mailing list archive at Nabble.com.