You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Entity
@Table(name="groups")
public class GroupData {
@Id
@GeneratedValue
public long id;
public long groupId;
public String groupName;
public String[] test;
}
The text was updated successfully, but these errors were encountered:
I am sorry for reply you too late, no error.
but it will create wrong table.
example:
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="groups")
public class GroupData {
@Id
@GeneratedValue
public long id;
public long groupId;
public String groupName;
public String[] test;
}
import com.dieselpoint.norm.Database;
public class run {
public static void main(String[] args) {
try {
Database database = new Database();
database.setJdbcUrl("jdbc:h2:/tmp/test;database_to_upper=false;TRACE_LEVEL_FILE=0;TRACE_LEVEL_SYSTEM_OUT=0;DB_CLOSE_DELAY=20;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=true");
database.setUser("sa");
database.setPassword("");
database.createTable(GroupData.class);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
it will do this:
create table groups (id bigint auto_increment,groupId bigint,groupName varchar(255),test varchar(255), primary key (id))
test = varchar(255) ?
it is array! not text... @ccleve
Example:
The text was updated successfully, but these errors were encountered: