IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Hibernate Java Discussion :

Id auto increment dans Oracle en utilisant Hibernate


Sujet :

Hibernate Java

  1. #1
    Futur Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Juillet 2016
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2016
    Messages : 17
    Points : 8
    Points
    8
    Par défaut Id auto increment dans Oracle en utilisant Hibernate
    j'ai un probleme dans l'ajout a travers mon formulaire
    voila les erreurs qui s'affichent :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
     
    org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.stage.model.Langueparlee
    	at org.hibernate.id.Assigned.generate(Assigned.java:52)
    	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:118)
    	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:204)
    	at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55)
    	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:189)
    	at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:49)
    	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)
    	at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:670)
    	at org.hibernate.internal.SessionImpl.save(SessionImpl.java:662)
    	at org.hibernate.internal.SessionImpl.save(SessionImpl.java:658)
    	at com.stage.DAO.LangueparleeDAOImpl.addLangueparlee(LangueparleeDAOImpl.java:23)
    	at com.stage.service.LangueparleeServiceImpl.addLangueparlee(LangueparleeServiceImpl.java:29)
    	at com.stage.bean.LangueparleeBean.addLangueparlee(LangueparleeBean.java:155)
    	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.apache.el.parser.AstValue.invoke(AstValue.java:262)
    	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
    	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
    	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    	at org.springframework.faces.webflow.FlowActionListener.processAction(FlowActionListener.java:71)
    	at org.springframework.faces.model.SelectionTrackingActionListener.processAction(SelectionTrackingActionListener.java:55)
    	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
    	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
    	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:619)
    code du formulaire :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
     
    <!-- langueparlee Add -->
    		<h:form dir="ltr" id="langueparleeAddForm">
     
    			<p:dialog header="Ajouter Langueparlee" widgetVar="langueparleeAdd"
    				resizable="false" id="langueparleeAdd" showEffect="fade"
    				hideEffect="explode" modal="true">
    				<h:panelGrid columns="2" id="langueparleePanelAdd">
     
     
    					<h:outputLabel value="libelle :" />
    					<p:inputText id="libelle"
    						value="#{LangueparleeBean.langueparlee.libelle}">
    					</p:inputText>
     
     
    					<f:facet name="footer">
    						<p:spacer height="50px;"></p:spacer>
     
    						<p:commandButton id="add" value="Ajouter"
    							action="#{LangueparleeBean.addLangueparlee}" type="submit"
    							update="langueparleeForm" ajax="true" />
    						<p:commandButton value="Annuler" type="reset"
    							oncomplete="langueparleeAdd.hide()" />
    					</f:facet>
     
    				</h:panelGrid>
    			</p:dialog>
    		</h:form>
    classe java :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
     
    @Entity
    @Table(name = "LANGUEPARLEE")
    public class Langueparlee implements java.io.Serializable {
    	@Id
    	@Column(name = "idlangueparlee")
    	@GeneratedValue(strategy = GenerationType.AUTO)
    	private BigDecimal idlangueparlee;
    	private String libelle;
    	private Set<Niveaulangueparlee> niveaulangueparlees = new HashSet<Niveaulangueparlee>(
    			0);
     
    	public Langueparlee() {
    	}
     
    	public Langueparlee(BigDecimal idlangueparlee) {
    		this.idlangueparlee = idlangueparlee;
    	}
     
    	public Langueparlee(BigDecimal idlangueparlee, String libelle,
    			Set<Niveaulangueparlee> niveaulangueparlees) {
    		this.idlangueparlee = idlangueparlee;
    		this.niveaulangueparlees = niveaulangueparlees;
     
    	}
     
    	@Id
    	@Column(name = "IDLANGUEPARLEE", unique = true, nullable = false, precision = 22, scale = 0)
    	public BigDecimal getIdlangueparlee() {
    		return this.idlangueparlee;
    	}
     
    	public void setIdlangueparlee(BigDecimal idlangueparlee) {
    		this.idlangueparlee = idlangueparlee;
    	}
     
    	public String getLibelle() {
    		return libelle;
    	}
     
    	public void setLibelle(String libelle) {
    		this.libelle = libelle;
    	}
     
    	@OneToMany(fetch = FetchType.LAZY, mappedBy = "langueparlee")
    	public Set<Niveaulangueparlee> getNiveaulangueparlees() {
    		return this.niveaulangueparlees;
    	}
     
    	public void setNiveaulangueparlees(
    			Set<Niveaulangueparlee> niveaulangueparlees) {
    		this.niveaulangueparlees = niveaulangueparlees;
    	}
     
    }
    Pouvez vous m'aider svp et merci d'avance

  2. #2
    Membre chevronné Avatar de jeffray03
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2008
    Messages
    1 501
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Allemagne

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Juillet 2008
    Messages : 1 501
    Points : 2 120
    Points
    2 120
    Par défaut
    salut,
    peux-tu nous montrer la classe ou se trouve cette methode:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    com.stage.DAO.LangueparleeDAOImpl.addLangueparlee(LangueparleeDAOImpl.java:23)
    car il te dit que tes Ids doivent etre affecter manuellement.
    quelle Base de données utilises tu?

    eric

  3. #3
    Futur Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Juillet 2016
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2016
    Messages : 17
    Points : 8
    Points
    8
    Par défaut
    j'utilise Oracle comme base de donnee
    Au debut j'ai mis un input pour id et je l'ajout manuellement puis j'ai essayé de changer l'id en auto increment a travers sequence aussi j'ai enlever input de l'id ainsi que j'ai ajouter annotations pour l'id dans la classe de mappping
    classe LangueparleeDAOImpl :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
     
    package com.stage.DAO;
     
    import java.util.ArrayList;
    import java.util.List;
     
    import org.hibernate.Session;
    import org.hibernate.Transaction;
    import org.springframework.stereotype.Repository;
     
    import com.stage.model.Langueparlee;
    import com.stage.util.HibernateUtil;
     
    @Repository("LangueparleeRepository")
    public class LangueparleeDAOImpl implements LangueparleeDAO {
     
    	@Override
    	public void addLangueparlee(Langueparlee langueparlee) {
    		Transaction trns = null;
    		Session session = HibernateUtil.getSessionFactory().openSession();
     
    		try {
    			trns = session.beginTransaction();
    			session.save(langueparlee);
    			session.getTransaction().commit();
    		} catch (RuntimeException e) {
    			if (trns != null) {
    				trns.rollback();
    			}
    			e.printStackTrace();
    		} finally {
    			session.close();
    		}
     
     
     
    	}
     
    	@Override
    	public void deleteLangueparlee(Langueparlee langueparlee) {
    		Transaction trns = null;
    		Session session = HibernateUtil.getSessionFactory().openSession();
    		try {
    			trns = session.beginTransaction();
     
    			session.delete(langueparlee);
    			session.getTransaction().commit();
    		} catch (RuntimeException e) {
    			if (trns != null) {
    				trns.rollback();
    			}
    			e.printStackTrace();
    		} finally {
    			session.close();
    			 trns.commit();
    		}
     
     
    	}
     
    	@Override
    	public void updateLangueparlee(Langueparlee langueparlee) {
    		Transaction trns = null;
    		Session session = HibernateUtil.getSessionFactory().openSession();
    		try {
    			trns = session.beginTransaction();
    			session.update(langueparlee);
    			session.getTransaction().commit();
    		} catch (RuntimeException e) {
    			if (trns != null) {
    				trns.rollback();
    			}
    			e.printStackTrace();
    		} finally {
    			session.close();
    		}
     
    	}
     
    	@Override
    	public List<Langueparlee> getAllLangueparlees() {
    		List<Langueparlee> langueparlees = new ArrayList<Langueparlee>();
    		Transaction trns = null;
    		Session session = HibernateUtil.getSessionFactory().openSession();
    		try {
    			trns = session.beginTransaction();
     
    			langueparlees = session.createQuery("from Langueparlee").list();
    		} catch (RuntimeException e) {
    			e.printStackTrace();
    		} finally {
    			session.close();
    			 trns.commit();
    		}
    		return langueparlees;
    	}
     
     
    }

  4. #4
    Membre chevronné Avatar de jeffray03
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2008
    Messages
    1 501
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Allemagne

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Juillet 2008
    Messages : 1 501
    Points : 2 120
    Points
    2 120
    Par défaut
    et comment est ce que tu recupres ton Id avant de faire l´insertion?
    ici comment crees tu ton entité avant de la sauvegarder?
    voir les methodes:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    com.stage.service.LangueparleeServiceImpl.addLangueparlee(LangueparleeServiceImpl.java:29)
    com.stage.bean.LangueparleeBean.addLangueparlee(LangueparleeBean.java:155)
    eric

  5. #5
    Futur Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Juillet 2016
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2016
    Messages : 17
    Points : 8
    Points
    8
    Par défaut
    j'ai pas bien compris le probleme ,je suis debutante, comment je peux le recuperer?
    service
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    @Transactional(readOnly = false)
    	public void addLangueparlee(Langueparlee langueparlee) {
    		langueparleeDAO.addLangueparlee(langueparlee);
     
    	}
    bean
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
     
    public void addLangueparlee() {
    		System.out.println("fonction addBean begin");
    		try {
    			getlangueparleeService().addLangueparlee(langueparlee);
    		} catch (Exception ex) {
    			FacesMessage message = new FacesMessage(
    					FacesMessage.SEVERITY_ERROR, "Error updating data", "NOK!!");
    			FacesContext.getCurrentInstance().addMessage(null, message);
    		}
    		closePopUp("langueparleeAdd");
     
    		renitializeLangueparlee(langueparlee);
    		System.out.println("fonction addBean end");
    	}

  6. #6
    Membre chevronné Avatar de jeffray03
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2008
    Messages
    1 501
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Allemagne

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Juillet 2008
    Messages : 1 501
    Points : 2 120
    Points
    2 120
    Par défaut
    salut,
    comment as-tu crée "langueparlee" qui est ici :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     langueparleeDAO.addLangueparlee(langueparlee);
    ou bien mets ceci dans ton entité cela devrait aussi marcher:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    	@Id
    	@GenericGenerator(name = "kaugen1", strategy = "increment")
    	@GeneratedValue(generator = "kaugen1")
    	@Column(name = "idlangueparlee")
    	private BigDecimal idlangueparlee;
    eric

  7. #7
    Futur Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Juillet 2016
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2016
    Messages : 17
    Points : 8
    Points
    8
    Par défaut
    Citation Envoyé par jeffray03 Voir le message
    salut,
    comment as-tu crée "langueparlee" qui est ici :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     langueparleeDAO.addLangueparlee(langueparlee);
    voila la methode
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    @Override
    	public void addLangueparlee(Langueparlee langueparlee) {
    		Transaction trns = null;
    		Session session = HibernateUtil.getSessionFactory().openSession();
     
    		try {
    			trns = session.beginTransaction();
    			session.save(langueparlee);
    			session.getTransaction().commit();
    		} catch (RuntimeException e) {
    			if (trns != null) {
    				trns.rollback();
    			}
    			e.printStackTrace();
    		} finally {
    			session.close();
    		}
     
     
     
    	}

  8. #8
    Membre chevronné Avatar de jeffray03
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2008
    Messages
    1 501
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Allemagne

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Juillet 2008
    Messages : 1 501
    Points : 2 120
    Points
    2 120
    Par défaut
    la c´est une methode et il est la comme parametre.
    cela ne dit pas comment est ce que tu l´a crée.

  9. #9
    Futur Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Juillet 2016
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2016
    Messages : 17
    Points : 8
    Points
    8
    Par défaut
    Citation Envoyé par jeffray03 Voir le message
    salut,
    ou bien mets ceci dans ton entité cela devrait aussi marcher:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    	@Id
    	@GenericGenerator(name = "kaugen1", strategy = "increment")
    	@GeneratedValue(generator = "kaugen1")
    	@Column(name = "idlangueparlee")
    	private BigDecimal idlangueparlee;
    eric
    j'ai essayé mais meme probleme

  10. #10
    Futur Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Juillet 2016
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2016
    Messages : 17
    Points : 8
    Points
    8
    Par défaut
    Citation Envoyé par jeffray03 Voir le message
    la c´est une methode et il est la comme parametre.
    cela ne dit pas comment est ce que tu l´a crée.
    je l'ai passé en parametre,c'est faux? qu'est ce que je dois changer?
    merci pour votre aide

  11. #11
    Membre chevronné Avatar de jeffray03
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2008
    Messages
    1 501
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Allemagne

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Juillet 2008
    Messages : 1 501
    Points : 2 120
    Points
    2 120
    Par défaut
    salut,
    change la classe ci comme ca:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
     
    @Entity
    @Table(name = "LANGUEPARLEE")
    public class Langueparlee implements java.io.Serializable {
     
            @Id
    	@GenericGenerator(name = "kaugen1", strategy = "increment")
    	@GeneratedValue(generator = "kaugen1")
    	@Column(name = "idlangueparlee")
    	private BigDecimal idlangueparlee;
    	private String libelle;
    	private Set<Niveaulangueparlee> niveaulangueparlees = new HashSet<Niveaulangueparlee>(
    			0);
     
    	public Langueparlee() {
    	}
     
    	public Langueparlee(BigDecimal idlangueparlee) {
    		this.idlangueparlee = idlangueparlee;
    	}
     
    	public Langueparlee(BigDecimal idlangueparlee, String libelle,
    			Set<Niveaulangueparlee> niveaulangueparlees) {
    		this.idlangueparlee = idlangueparlee;
    		this.niveaulangueparlees = niveaulangueparlees;
     
    	}
     
     
    	public BigDecimal getIdlangueparlee() {
    		return this.idlangueparlee;
    	}
     
    	public void setIdlangueparlee(BigDecimal idlangueparlee) {
    		this.idlangueparlee = idlangueparlee;
    	}
     
    	public String getLibelle() {
    		return libelle;
    	}
     
    	public void setLibelle(String libelle) {
    		this.libelle = libelle;
    	}
     
    	@OneToMany(fetch = FetchType.LAZY, mappedBy = "langueparlee")
    	public Set<Niveaulangueparlee> getNiveaulangueparlees() {
    		return this.niveaulangueparlees;
    	}
     
    	public void setNiveaulangueparlees(
    			Set<Niveaulangueparlee> niveaulangueparlees) {
    		this.niveaulangueparlees = niveaulangueparlees;
    	}
     
    }

Discussions similaires

  1. Auto increment sur Oracle
    Par intissar_g dans le forum SQL
    Réponses: 3
    Dernier message: 30/09/2008, 15h06
  2. Exception dans un programme utilisant Hibernate
    Par caro_caro dans le forum Persistance des données
    Réponses: 7
    Dernier message: 19/02/2008, 17h56
  3. Auto-Increment dans PySqLite ?
    Par Ggamer dans le forum Général Python
    Réponses: 2
    Dernier message: 10/09/2007, 11h42
  4. [SQL Server] auto increment dans une vue
    Par pimousse_cerise dans le forum Langage SQL
    Réponses: 4
    Dernier message: 16/05/2006, 10h18
  5. 2 auto increment dans une meme table
    Par gesualda dans le forum SQL Procédural
    Réponses: 4
    Dernier message: 12/10/2005, 09h31

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo