-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: composite-element
PostPosted: Tue Apr 18, 2006 12:36 pm 
Newbie

Joined: Tue Apr 18, 2006 12:26 pm
Posts: 1
Salut,
J'ai un probleme surlequel je suis bloqué depuis trois jours et j'ai besoin d'aide... En fait, j'ai un composite-element et je veux mettre à jour les valeurs des colonnes qui ne correpondent pas aux clés primaires, mais je n'y arrive pas...

Plus clairement, j'ai une association (Actors_DataType) entre trois tables Actors (qui correspond à une classe Java Acteur) et DataType (qui correpond a une classe Java Field) et Territory (qui correspond à une classe Java Territory). Le composite-element correspond à un attribut "rights" dans la classe Actors et a une classe Java TerritoryActorField...
L'association possede 5 champs: les trois cles etrangeres et deux champs: right et mandatory.

LE mapping du composite-element est fait dans le fichier de mapping de la table Actors...

Pour mettre à jour la valeur de right (changer sa valeur par une autre valeur "newRight) j'ai fait ceci:

.....

Set lesDroits = getActorById(actor.getActorId()).getRights();
Iterator iterator = lesDroits.iterator();
while (iterator.hasNext()) {
TerritoryActorField taf = (TerritoryActorField) iterator.next();
if (taf.getField().getFieldId().equals(field.getFieldId())
&& taf.getTerritory().getTerritoryId().equals(
territory.getTerritoryId())) {
taf.setRight(newRight);
updateActor(actor);
}
}
...

Mais ca ne marche (ca ne change pas la valeur de right).

Est ce que vous avez une idee?

Merci


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.