You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Мария Помазкина <ma...@gmail.com> on 2019/09/24 05:05:56 UTC

A question

Hello!
Qould you please tell me,
can I get Embeddable field data by sql query?
My field is (I need to get lastNamefrow sql query):

@Table(name = "rzd_employee")
public class EmployeeExtVO implements Serializable {

...................

    @Embedded
    @QuerySqlField
    private GeneralAttrs general;
...................
}

@Embeddable
public class GeneralAttrs implements Serializable {

   @QuerySqlField
    private String lastName;

Re: A question

Posted by Павлухин Иван <vo...@gmail.com>.
Hi Maria,

Yes, it should work with your classes. It worth noting, that
"lastName" will be accessible in your queries, "SELECT lastName FROM
..." should work. Note that you should use simply "lastName" in SQL
but not "general.lastName".

By the way, usually it is better to write such questions to Ignite
users list user@ignite.apache.org, there you will definitely get the
answer.

вт, 24 сент. 2019 г. в 20:57, Мария Помазкина <ma...@gmail.com>:
>
> Hello!
> Qould you please tell me,
> can I get Embeddable field data by sql query?
> My field is (I need to get lastNamefrow sql query):
>
> @Table(name = "rzd_employee")
> public class EmployeeExtVO implements Serializable {
>
> ...................
>
>     @Embedded
>     @QuerySqlField
>     private GeneralAttrs general;
> ...................
> }
>
> @Embeddable
> public class GeneralAttrs implements Serializable {
>
>    @QuerySqlField
>     private String lastName;



-- 
Best regards,
Ivan Pavlukhin