Home How to see model class in H2 database
Reply: 0

How to see model class in H2 database

user1415
1#
user1415 Published in July 16, 2018, 6:15 pm

I cannot see my tables that I created as model class in h2 database console.

Actually I can access the h2 database (by writing localhost:/h2-console). But I can't see my tables.

Altough I added @Entity annotation, I can not see the table in h2-database.

Product model class:

package com.example;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * Created by jt on 11/6/15.
 */
@Entity
public class Product implements DomainObject{

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;

    private String description;
    private BigDecimal price;
    private String imageUrl;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.304841 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO